Commit 6baf266c authored by Jacob's avatar Jacob

Merge pull request #10761 from jochenberger/dont-create-tooltip-for-destroy

don't create new Tooltip/Popover objects just to destroy them immediately
parents 39091b07 f350d1ba
......@@ -85,6 +85,7 @@
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.popover')
if (!data && option === 'destroy') return
var options = typeof option == 'object' && option
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
......
......@@ -376,6 +376,7 @@
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tooltip')
if (!data && option === 'destroy') return
var options = typeof option == 'object' && option
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment