From 1ff29e3f3dc1959ca4737b19d418eaa9971e7189 Mon Sep 17 00:00:00 2001 From: lisheng Date: Tue, 21 Jan 2020 08:08:15 +0800 Subject: [PATCH] fix: When the classes of the v-tooltip instruction are passed in the form of an array, the tooltip flashes. (#300) --- src/lib/tooltip.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/tooltip.js b/src/lib/tooltip.js index 1f3544eb..913e953c 100644 --- a/src/lib/tooltip.js +++ b/src/lib/tooltip.js @@ -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, @@ -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 }