Skip to content

Instantly share code, notes, and snippets.

@rogeriolino
Created October 23, 2017 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogeriolino/f76c5a19a88a5c3ead5143043350aa3f to your computer and use it in GitHub Desktop.
Save rogeriolino/f76c5a19a88a5c3ead5143043350aa3f to your computer and use it in GitHub Desktop.
Fixing arcgis4.4 hitTest error
/*
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