From 5e051532c011cae5ccaba373519819cf24d67bce Mon Sep 17 00:00:00 2001 From: Kang Cheng Date: Wed, 31 Oct 2018 19:50:18 +0000 Subject: [PATCH] use copy of cached value --- src/core/render/embed.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/render/embed.js b/src/core/render/embed.js index ea294ed71..85afbe646 100644 --- a/src/core/render/embed.js +++ b/src/core/render/embed.js @@ -57,9 +57,11 @@ function walkFetchEmbed({embedTokens, compile, fetch}, cb) { } export function prerenderEmbed({compiler, raw = '', fetch}, done) { - let hit - if ((hit = cached[raw])) { - return done(hit) + let hit = cached[raw] + if (hit) { + const copy = hit.slice() + copy.links = hit.links + return done(copy) } const compile = compiler._marked