Skip to content

Commit

Permalink
fix: When the classes of the v-tooltip instruction are passed in the …
Browse files Browse the repository at this point in the history
…form of an array, the tooltip flashes. (#300)
  • Loading branch information
FAKER-A authored and Akryum committed Jan 21, 2020
1 parent ba01739 commit 1ff29e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Popper from 'popper.js'
import { getOptions, directive } from '../directives/v-tooltip'
import { addClasses, removeClasses, supportsPassive } from '../utils'
import isEqual from 'lodash/isEqual'

const DEFAULT_OPTIONS = {
container: false,
Expand Down Expand Up @@ -130,7 +131,7 @@ export default class Tooltip {
setOptions (options) {
let classesUpdated = false
const classes = (options && options.classes) || directive.options.defaultClass
if (this._classes !== classes) {
if (!isEqual(this._classes, classes)) {
this.setClasses(classes)
classesUpdated = true
}
Expand Down

0 comments on commit 1ff29e3

Please sign in to comment.