diff --git a/src/main.js b/src/main.js index e10c10c..778f181 100644 --- a/src/main.js +++ b/src/main.js @@ -11,18 +11,32 @@ window.jQuery = window.$ = require("jquery"); const app = createApp(App).use(store).use(router); +const pass = () => {}; + app.directive("tooltip", { mounted(el, binding) { - window.$(el).tooltip({ - placement: binding.arg, - trigger: "hover", - }); + try { + window.$(el).tooltip({ + placement: binding.arg, + trigger: "hover", + }); + } catch { + pass(); + } }, updated(el) { - window.$(el).tooltip("update"); + try { + window.$(el).tooltip("update"); + } catch { + pass(); + } }, unmounted(el) { - window.$(el).tooltip("dispose"); + try { + window.$(el).tooltip("dispose"); + } catch { + pass(); + } }, });