You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On applyPatches() functions the loadFile() option accept a callback that must be called with the content of the file to be patched, but the patched() option don't, forcing to implement it as a sync function. Ironically, just in the next line there's a setTimeout(processIndex, 0) to process the next index!
What I propose is to add a callback argument to patched() function so it can both notify when it has finished and can start processing the next index, and also if there was an error while writting the patch. A more advanced option would be to use async.js for that, that's already a dependency and would make the code a bit cleaner.
The text was updated successfully, but these errors were encountered:
On
applyPatches()
functions theloadFile()
option accept a callback that must be called with the content of the file to be patched, but thepatched()
option don't, forcing to implement it as a sync function. Ironically, just in the next line there's asetTimeout(processIndex, 0)
to process the next index!What I propose is to add a callback argument to
patched()
function so it can both notify when it has finished and can start processing the next index, and also if there was an error while writting the patch. A more advanced option would be to useasync.js
for that, that's already a dependency and would make the code a bit cleaner.The text was updated successfully, but these errors were encountered: