diff --git a/src/util/imagesLoader.js b/src/util/imagesLoader.js index 99d86287b..3e90f03d6 100644 --- a/src/util/imagesLoader.js +++ b/src/util/imagesLoader.js @@ -2,7 +2,9 @@ import { asArray as ol_color_asArray } from 'ol/color' /** @namespace ol.ext.imageLoader */ -if (window.ol) window.ol.ext.imageLoader = {}; +if (window.ol && ol.ext && !ol.ext.imageLoader) { + ol.ext.imageLoader = {}; +} /** Helper for loading BIL-32 (Band Interleaved by Line) image * @param {string} src diff --git a/src/util/input/Base.js b/src/util/input/Base.js index ec1029e97..940b78502 100644 --- a/src/util/input/Base.js +++ b/src/util/input/Base.js @@ -6,7 +6,7 @@ import ol_Object from 'ol/Object' /** @namespace ol.ext.input */ /*global ol*/ -if (window.ol) { +if (window.ol && ol.ext && !ol.ext.input) { ol.ext.input = {}; }