From f6616545076b2a436ac0920be0d045430df3fd84 Mon Sep 17 00:00:00 2001 From: zhangguanghui Date: Wed, 9 Oct 2024 18:18:23 +0800 Subject: [PATCH] Fix custom array prototype conflicts --- src/utils/adopter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/adopter.js b/src/utils/adopter.js index 962412fd..8a686931 100644 --- a/src/utils/adopter.js +++ b/src/utils/adopter.js @@ -127,7 +127,9 @@ export function extend(modules, methods) { for (i = modules.length - 1; i >= 0; i--) { for (key in methods) { - modules[i].prototype[key] = methods[key] + if (!modules[i].prototype[key]) { + modules[i].prototype[key] = methods[key] + } } } }