From d3b308bf6873fd9c868663b55b38bec42a3f48e0 Mon Sep 17 00:00:00 2001 From: sky Date: Fri, 30 Jun 2017 10:05:43 +0800 Subject: [PATCH] :bug: bug(link): fix ie traverse custom Array.prototype method (#188) by @632781460 --- src/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.js b/src/index.js index a9adc8035..509b267b4 100644 --- a/src/index.js +++ b/src/index.js @@ -211,6 +211,11 @@ export default class VueI18n { // them with its translation const matches: any = ret.match(/(@:[\w\-_|.]+)/g) for (const idx in matches) { + // ie compatible: filter custom array + // prototype method + if (!matches.hasOwnProperty(idx)) { + continue + } const link: string = matches[idx] // Remove the leading @: const linkPlaceholder: string = link.substr(2)