aboutsummaryrefslogtreecommitdiff
path: root/test/reduce.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-17 22:36:59 +0000
committerGitHub <noreply@github.com>2021-01-18 06:36:59 +0800
commite23a10f7f96cda932c605988d2d99bb5225d18a5 (patch)
tree55bc342a6c9bd3404bf5f5094055e9eaea3fb3d4 /test/reduce.js
parent884ec4e8a5dc83aa8897bfa7bf49034907311e47 (diff)
downloadtracifyjs-e23a10f7f96cda932c605988d2d99bb5225d18a5.tar.gz
tracifyjs-e23a10f7f96cda932c605988d2d99bb5225d18a5.zip
fix corner case in `loops` (#4565)
fixes #4564
Diffstat (limited to 'test/reduce.js')
-rw-r--r--test/reduce.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/reduce.js b/test/reduce.js
index c478da5f..91df8bce 100644
--- a/test/reduce.js
+++ b/test/reduce.js
@@ -666,7 +666,7 @@ function has_loopcontrol(body, loop, label) {
}
function is_error(result) {
- return typeof result == "object" && typeof result.name == "string" && typeof result.message == "string";
+ return result && typeof result.name == "string" && typeof result.message == "string";
}
function is_timed_out(result) {