fix for OSD 'unload' before is has time to bootstrap

This commit is contained in:
Edward Silverton 2020-07-14 14:46:58 +01:00
parent 84dd5cd6a7
commit c628f46591

View File

@ -240,6 +240,11 @@ $.Viewer = function( options ) {
} }
this.element = this.element || document.getElementById( this.id ); this.element = this.element || document.getElementById( this.id );
if (!this.element) {
return;
}
this.canvas = $.makeNeutralElement( "div" ); this.canvas = $.makeNeutralElement( "div" );
this.canvas.className = "openseadragon-canvas"; this.canvas.className = "openseadragon-canvas";