Comparing version 3.0.0 to 3.0.1
@@ -0,1 +1,6 @@ | ||
3.0.1 | ||
===== | ||
* Fix issue where broadcasts to frames would fail if parent page has overwritten the window.length variable | ||
3.0.0 | ||
@@ -2,0 +7,0 @@ ===== |
@@ -217,3 +217,4 @@ 'use strict'; | ||
function _broadcast(frame, payload, origin) { | ||
var i; | ||
var i = 0; | ||
var frameToBroadcastTo; | ||
@@ -227,4 +228,12 @@ try { | ||
for (i = 0; i < frame.frames.length; i++) { | ||
_broadcast(frame.frames[i], payload, origin); | ||
// previously, our max value was frame.frames.length | ||
// but frames.length inherits from window.length | ||
// which can be overwritten if a developer does | ||
// `var length = value;` outside of a function | ||
// scope, it'll prevent us from looping through | ||
// all the frames. With this, we loop through | ||
// until there are no longer any frames | ||
while (frameToBroadcastTo = frame.frames[i]) { // eslint-disable-line no-cond-assign | ||
_broadcast(frameToBroadcastTo, payload, origin); | ||
i++; | ||
} | ||
@@ -231,0 +240,0 @@ } catch (_) { /* ignored */ } |
@@ -9,3 +9,3 @@ { | ||
"homepage": "https://github.com/braintree/framebus", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"main": "lib/framebus.js", | ||
@@ -12,0 +12,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17821
237
0