We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently it doesn't work correctly for falsy values.
falsy
Steps to reproduce:
example.org#%#//scriptlet('set-constant', 'foo.bar.test', 'true', '', '', 'true')
foo = { bar: { abc: {} } }; console.log('Original foo.bar - foo.bar.test:', foo.bar.test); foo.bar = { abc: {}, }; console.log('Rewritten foo.bar - foo.bar.test:', foo.bar.test);
or
foo = { bar: { abc: {} } }; console.log('Original foo.bar - foo.bar.test:', foo.bar.test); foo.bar = { abc: {}, test: false, }; console.log('Rewritten foo.bar - foo.bar.test:', foo.bar.test);
foo.bar.test should returns true.
foo.bar.test
true
Probably currentObj && should be removed from:
currentObj &&
Scriptlets/src/scriptlets/set-constant.js
Line 320 in 2f91f88
The text was updated successfully, but these errors were encountered:
stanislav-atr
No branches or pull requests
Currently it doesn't work correctly for
falsy
values.Steps to reproduce:
Code:
or
Code:
foo.bar.test
should returnstrue
.Probably
currentObj &&
should be removed from:Scriptlets/src/scriptlets/set-constant.js
Line 320 in 2f91f88
The text was updated successfully, but these errors were encountered: