Skip to content

Commit

Permalink
revert changes to in-page-script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
omarhamdan committed Feb 25, 2018
1 parent 9b77614 commit cb223bb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion skeletons/web-extension/scripts/in-page-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@
onReady(function() {
var libraries = window.Ember && window.Ember.libraries;
if (libraries) {
// Ember has changed where the array of libraries is located.
// In older versions, `Ember.libraries` was the array itself,
// but now it's found under _registry.
if (libraries._registry) {
libraries = libraries._registry;
}

var versions = Array.prototype.slice.call(libraries, 0);
window.postMessage({
type: 'emberVersion',
versions: libraries._registry.slice()
versions: versions
}, '*');
}
});
Expand Down

0 comments on commit cb223bb

Please sign in to comment.