Skip to content

Instantly share code, notes, and snippets.

@hodak
Created January 15, 2016 08:09
Show Gist options
  • Save hodak/15c63c024d59be5061c3 to your computer and use it in GitHub Desktop.
Save hodak/15c63c024d59be5061c3 to your computer and use it in GitHub Desktop.
angular-ui-tree: JavaScript runtime error: Object doesn't support property or method 'contains'
// There's an issue in ui-tree:
// - https://github.com/angular-ui-tree/angular-ui-tree/issues/318
// Waiting for Pull Request to be merged:
// - https://github.com/angular-ui-tree/angular-ui-tree/pull/648
// Issue type is very similar to this in angular.js:
// - https://github.com/angular/angular.js/issues/10259
// Function aliasing: http://stackoverflow.com/a/1007433/1023664
// Recommendation: Update angular-ui-tree after the pull request is merged
if(typeof document.contains === "undefined") {
document.contains = function() {
return document.body.contains.apply(document.body, arguments);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment