From e1b651b66c31f0123e46bb2ca68ddea8d1395bd0 Mon Sep 17 00:00:00 2001 From: Tammy DiPrima Date: Wed, 13 Apr 2022 13:33:44 -0400 Subject: [PATCH] update expression Code fails if element.style is undefined. --- src/openseadragon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index 731a06b4..d690f370 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -1986,7 +1986,7 @@ function OpenSeadragon( options ){ */ setElementPointerEvents: function( element, value ) { element = $.getElement( element ); - if ( typeof element.style.pointerEvents !== 'undefined' ) { + if (typeof element.style !== 'undefined' && typeof element.style.pointerEvents !== 'undefined' ) { element.style.pointerEvents = value; } },