0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-05 06:10:07 -05:00

Merge pull request #103 from shiawuen/top

fix bug on Browserify component when embed in multi layers of iframe
This commit is contained in:
Neil Jenkins 2015-06-23 15:16:08 +07:00
commit de7d7011a7

View file

@ -1,14 +1,14 @@
/*jshint ignore:start */ /*jshint ignore:start */
if ( typeof exports === 'object' ) {
module.exports = Squire;
} else {
if ( top !== win ) { if ( top !== win ) {
win.editor = new Squire( doc ); win.editor = new Squire( doc );
if ( win.onEditorLoad ) { if ( win.onEditorLoad ) {
win.onEditorLoad( win.editor ); win.onEditorLoad( win.editor );
win.onEditorLoad = null; win.onEditorLoad = null;
} }
} else {
if ( typeof exports === 'object' ) {
module.exports = Squire;
} else { } else {
win.Squire = Squire; win.Squire = Squire;
} }