diff --git a/source/outro.js b/source/outro.js index e99b9f6..20b91c2 100644 --- a/source/outro.js +++ b/source/outro.js @@ -1,14 +1,14 @@ /*jshint ignore:start */ -if ( top !== win ) { - win.editor = new Squire( doc ); - if ( win.onEditorLoad ) { - win.onEditorLoad( win.editor ); - win.onEditorLoad = null; - } +if ( typeof exports === 'object' ) { + module.exports = Squire; } else { - if ( typeof exports === 'object' ) { - module.exports = Squire; + if ( top !== win ) { + win.editor = new Squire( doc ); + if ( win.onEditorLoad ) { + win.onEditorLoad( win.editor ); + win.onEditorLoad = null; + } } else { win.Squire = Squire; }