-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
return UnknownValue if the usedbranch is unkown and the path is not e…
…mpty (#5846)
- Loading branch information
Showing
4 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test/form/samples/logical-expression-with-property-access/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = defineTest({ | ||
description: 'keep logical expressions' | ||
}); |
8 changes: 8 additions & 0 deletions
8
test/form/samples/logical-expression-with-property-access/_expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const config = { | ||
someComponent: { }, | ||
default: { config1: 'config1DefaultValue' } | ||
}; | ||
|
||
var main = (config.someComponent || config.default).config1 || 'config1DefaultValue'; | ||
|
||
export { main as default }; |
6 changes: 6 additions & 0 deletions
6
test/form/samples/logical-expression-with-property-access/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const config = { | ||
someComponent: { someOtherConfig: false }, | ||
default: { config1: 'config1DefaultValue' } | ||
}; | ||
|
||
export default (config.someComponent || config.default).config1 || 'config1DefaultValue'; |