Skip to content

Commit

Permalink
Merge pull request #856 from gtt-project/fix/check-ol-ext-input-and-i…
Browse files Browse the repository at this point in the history
…mageloader

Check existence of "ol.ext" before initializing "ol.ext.input" and "ol.ext.imageLoader"
  • Loading branch information
Viglino authored Sep 19, 2022
2 parents e5fb88e + e77312c commit ad1012d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/util/imagesLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/util/input/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
}

Expand Down

0 comments on commit ad1012d

Please sign in to comment.