Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions angular-swfobject.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ angular.module('swfobject', [])
embedHandler);
}, 0);

if (scope.callbacks) {
var cbs = scope.callbacks;
var cbNames = Object.keys(cbs);

cbNames.forEach(function (cbName) {
$window[cbName] = cbs[cbName];
});

// Callbacks to be invoked from AS3 ExternalInterface set on `window`
if (!!scope.callbacks) {
Object.keys(scope.callbacks).forEach(function (cbName) {
$window[cbName] = scope.callbacks[cbName];
});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't bother with the !!, that's only really needed if you want to assign a boolean. And the indentation 😉

}


Expand Down