Update std.js

This commit is contained in:
Namhyeon Go 2022-02-08 20:40:41 +09:00 committed by GitHub
parent 7df4fde106
commit 0bc9249feb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,13 +169,13 @@ function rotate(target, callback, onError) {
while (!stop) {
try {
if (typeof callback === "function") {
stop = callback(i, arr[i]);
stop = !callback(i, arr[i]);
} else {
stop = true;
}
} catch (e) {
if (typeof onError === "function")
stop = onError(e);
stop = !onError(e);
;
}