diff --git a/v8-compile-cache.js b/v8-compile-cache.js index 4f53b41..920cc75 100644 --- a/v8-compile-cache.js +++ b/v8-compile-cache.js @@ -289,6 +289,9 @@ function slashEscape(str) { } function supportsCachedData() { + if (!process.versions.v8) { + return false; + } var script = new vm.Script('""', {produceCachedData: true}); return script.cachedDataProduced != null; }