fix: use copy of cached value (#668)
This commit is contained in:
parent
2edf47ec73
commit
5fcf210dd1
1 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue