Skip to content

Commit 5fcf210

Browse files
cheng-kangQingWei-Li
authored andcommitted
fix: use copy of cached value (#668)
1 parent 2edf47e commit 5fcf210

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/core/render/embed.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ function walkFetchEmbed({embedTokens, compile, fetch}, cb) {
5757
}
5858

5959
export function prerenderEmbed({compiler, raw = '', fetch}, done) {
60-
let hit
61-
if ((hit = cached[raw])) {
62-
return done(hit)
60+
let hit = cached[raw]
61+
if (hit) {
62+
const copy = hit.slice()
63+
copy.links = hit.links
64+
return done(copy)
6365
}
6466

6567
const compile = compiler._marked

0 commit comments

Comments
 (0)