Skip to content

Commit

Permalink
Clean up code from #156.
Browse files Browse the repository at this point in the history
  • Loading branch information
lehni committed Feb 14, 2013
1 parent 6729646 commit da08e74
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/PaperScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,11 @@ var PaperScript = this.PaperScript = new function() {
}
}

// Catch cases where paperjs is loaded after the browser event has already occurred.
if ( document.readyState === "complete" ) {
// Catch cases where paper.js is loaded after the browser event has already
// occurred.
if (document.readyState === 'complete') {
// Handle it asynchronously
setTimeout( load );
setTimeout(load);
} else {
DomEvent.add(window, { load: load });
}
Expand Down

0 comments on commit da08e74

Please sign in to comment.