From 17553034bcdf7753395bc232c48fb83f4d9f0cd9 Mon Sep 17 00:00:00 2001 From: Chantouch Sek Date: Thu, 18 Jan 2024 11:15:46 +0700 Subject: [PATCH] Revert "Changing the Vue prototype object to work with Vue 2 or 3." --- src/sanitize.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/sanitize.ts b/src/sanitize.ts index 5d0db3b..eaac795 100644 --- a/src/sanitize.ts +++ b/src/sanitize.ts @@ -52,10 +52,7 @@ const VSanitize = { const { name = 'sanitize' } = defaultOptions; delete defaultOptions.name const options1 = { ...defaultOptions } as IOptions - - const vueProto = Vue?.config?.globalProperties ?? Vue.prototype; - vueProto[`$${name}`] = (dirty: string, opts = undefined) => sanitizeHtml(dirty, opts || options1); - + Vue.prototype[`$${name}`] = (dirty: string, opts = undefined) => sanitizeHtml(dirty, opts || options1); Vue.directive(name, (el, binding) => { if (binding.value !== binding.oldValue) { if (Array.isArray(binding.value)) {