mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00: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:
parent
84ac82da8f
commit
3fbb9b299a
@ -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({});
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user