mirror of
https://github.com/docsifyjs/docsify.git
synced 2026-10-21 22:56:24 +08:00
Fix the end condition for the embed content handling loop (#1824)
Co-authored-by: Koy Zhuang <koy@ko8e24.top>
This commit is contained in:
@@ -7,7 +7,7 @@ const cached = {};
|
||||
function walkFetchEmbed({ embedTokens, compile, fetch }, cb) {
|
||||
let token;
|
||||
let step = 0;
|
||||
let count = 1;
|
||||
let count = 0;
|
||||
|
||||
if (!embedTokens.length) {
|
||||
return cb({});
|
||||
@@ -73,7 +73,7 @@ function walkFetchEmbed({ embedTokens, compile, fetch }, cb) {
|
||||
}
|
||||
|
||||
cb({ token, embedToken });
|
||||
if (++count >= step) {
|
||||
if (++count >= embedTokens.length) {
|
||||
cb({});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user