From 6b69ff25cf57df95d613bc1ad76121d38917f2ac Mon Sep 17 00:00:00 2001 From: Daniel Gustaw Date: Tue, 6 Jun 2023 02:06:56 +0800 Subject: [PATCH] fixed optionsOrInstall.install is not a function https://github.com/code-farmer-i/vue-markdown-editor/issues/236 --- src/base-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base-editor.js b/src/base-editor.js index a7335048..98017e04 100644 --- a/src/base-editor.js +++ b/src/base-editor.js @@ -19,7 +19,7 @@ Component.lang = Lang; Component.use = function (optionsOrInstall, opt) { if (typeof optionsOrInstall === 'function') { optionsOrInstall(Component, opt); - } else { + } else if(typeof optionsOrInstall === 'object' && 'install' in optionsOrInstall && typeof optionsOrInstall.install === 'function') { optionsOrInstall.install(Component, opt); }