diff --git a/js/tooltip.js b/js/tooltip.js index b47c010f37..5830c4af19 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -52,7 +52,7 @@ this.options = this.getOptions(options) this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport) - if (this.$element[0] instanceof window.Document && !this.options.selector) { + if (this.$element[0] instanceof document.constructor && !this.options.selector) { throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!'); }