diff --git a/perf/index.js b/perf/index.js index 5dc8132fa..b69f33ccc 100644 --- a/perf/index.js +++ b/perf/index.js @@ -111,7 +111,8 @@ function runBenchmarks() { }, onComplete() { - global.getScope().benchmark.teardown() + const teardown = global.getScope().benchmark.teardown + if (teardown) teardown() } })) }