Skip to content

Commit

Permalink
Improve win.top handling
Browse files Browse the repository at this point in the history
Per issue 8
pipwerks#8
Hat tip to jheinstein
  • Loading branch information
pipwerks committed Dec 27, 2014
1 parent 4bfbd2a commit 7ec212c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JavaScript/SCORM_API_wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ pipwerks.SCORM.API.get = function(){
API = find(win.parent);
}

if(!API && win.top.opener){
if(!API && win.top && win.top.opener){
API = find(win.top.opener);
}

Expand Down

0 comments on commit 7ec212c

Please sign in to comment.