Created
October 23, 2017 17:14
-
-
Save rogeriolino/f76c5a19a88a5c3ead5143043350aa3f to your computer and use it in GitHub Desktop.
Fixing arcgis4.4 hitTest error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Workaround to fix error on arcgis4.4 view click | |
*/ | |
// XXX: TypeError: Cannot read property 'position' of undefined | |
view.originalHitTest = view.hitTest; | |
view.hitTest = function (evt) { | |
try { | |
return view.originalHitTest(evt); | |
} catch (e) { | |
console.error(e); | |
return Promise.reject(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment