0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

fix bug on Browserify component when embed on another window replacing containing window content

This commit is contained in:
shiawuen 2015-06-19 12:12:37 +08:00
parent a1ff33da9f
commit ff21cb37e6

View file

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