-
Notifications
You must be signed in to change notification settings - Fork 971
dont’t call to get site settings outside of mergeProps #9475
Conversation
flash allow-once doesn't seem to work.
same for noscript allow-once |
84c181b
to
36e5498
Compare
@bridiver can you please rebase? Is scenario by @diracdeltas fixed? |
36e5498
to
8d9b019
Compare
@NejcZdovc @diracdeltas updated to fix that issue |
appActions.noScriptExceptionsAdded(origin, | ||
noScriptExceptions.map(value => value === 0 ? false : value)) | ||
if (props.noScriptExceptions) { | ||
appActions.noScriptExceptionsAdded(props.origin, this.props.noScriptExceptions.filter((value, host) => value !== 0 ? false : value)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this line is wrong - the filter function should be a map function like in the original code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also i think it should be props.noScriptExceptions instead of this.props.noScriptExceptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably doesn't work because of that. I'll take a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noscript 'allow once' still isn't working (scripts are allowed even after the tab is closed and re-opened)
8d9b019
to
3ab5898
Compare
appActions.noScriptExceptionsAdded(origin, | ||
noScriptExceptions.map(value => value === 0 ? false : value)) | ||
if (props.noScriptExceptions) { | ||
appActions.noScriptExceptionsAdded(props.origin, props.noScriptExceptions.filter((value, host) => value !== 0 ? false : value)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should still be this.noScriptExceptions.map(value => value === 0 ? false : value))
, see c5d2f7b
should be good now |
@bridiver did you see my comment above ^ |
no, looks like I mixed it up on the rebase |
3ab5898
to
89cf3eb
Compare
updated |
appActions.noScriptExceptionsAdded(origin, | ||
noScriptExceptions.map(value => value === 0 ? false : value)) | ||
if (props.noScriptExceptions) { | ||
appActions.noScriptExceptionsAdded(props.origin, props.noScriptExceptions.filter((value, host) => value === 0 ? false : value)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is still the incorrect version, it should be the version above using map
not filter
89cf3eb
to
079a5e5
Compare
ok, this time I copy/pasted it so it better be right :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need tests for this? At minimum, it looks like we might want a unit test for getVisibleOrigin
079a5e5
to
cc3eedd
Compare
test added for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the test 😄 ++
dont’t call to get site settings outside of mergeProps
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests