Skip to content

Commit

Permalink
Bump version to 2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
braintreeps committed Dec 21, 2015
1 parent a75a936 commit 17f834b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
UNRELEASED
==========
2.0.4
=====

* Avoid exceptions while broadcasting events

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "git@github.com:braintree/framebus"
},
"homepage": "https://github.com/braintree/framebus",
"version": "2.0.3",
"version": "2.0.4",
"main": "dist/framebus.js",
"browser": "dist/framebus.js",
"files": [
Expand Down
13 changes: 13 additions & 0 deletions spec/unit/_broadcast.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,17 @@ describe('_broadcast', function () {

expect(frame.opener.top.frames[0].postMessage).to.have.been.called;
});

it("should not throw if window.opener has access denied", function () {
var self = this;
var frame = mkFrame(this);

Object.defineProperty(frame, 'opener', {
get: function () { throw new Error('Access denied'); }
});

expect(function () {
self.bus._broadcast(frame, 'payload', '*');
}).not.to.throw('Access denied');
});
});

0 comments on commit 17f834b

Please sign in to comment.