diff --git a/src/openseadragon.js b/src/openseadragon.js index 6eb8d09a..6df419a4 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -682,11 +682,15 @@ * @returns {OpenSeadragon.Viewer} */ window.OpenSeadragon = window.OpenSeadragon || function( options ){ - return new OpenSeadragon.Viewer( options ); - }; +if (typeof define === 'function' && define.amd) { + define(function () { + return (window.OpenSeadragon); + }); +} + (function( $ ){