Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix block scripts test failing
Browse files Browse the repository at this point in the history
Auditors: @bsclifton

Sometimes ContentSettingsObserver::allowScriptFromSource is being called with no script_url

I'm not sure why it is called that way but it seems to be unrelated to the info we want about the page being blocked
  • Loading branch information
bbondy authored and cezaraugusto committed Dec 20, 2016
1 parent 1d46524 commit f0a4295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/components/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ class Frame extends ImmutableComponent {

addEventListeners () {
this.webview.addEventListener('content-blocked', (e) => {
if (e.details[0] === 'javascript') {
if (e.details[0] === 'javascript' && e.details[1]) {
windowActions.setBlockedBy(this.frame, 'noScript', e.details[1])
}
})
Expand Down

0 comments on commit f0a4295

Please sign in to comment.