summaryrefslogtreecommitdiff
path: root/runtime/js/30_fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/30_fs.js')
-rw-r--r--runtime/js/30_fs.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/runtime/js/30_fs.js b/runtime/js/30_fs.js
index 51f2c411e..bdd575f19 100644
--- a/runtime/js/30_fs.js
+++ b/runtime/js/30_fs.js
@@ -5,9 +5,7 @@
const core = window.Deno.core;
const {
Date,
- DatePrototype,
MathTrunc,
- ObjectPrototypeIsPrototypeOf,
SymbolAsyncIterator,
SymbolIterator,
} = window.__bootstrap.primordials;
@@ -279,7 +277,7 @@
}
function toUnixTimeFromEpoch(value) {
- if (ObjectPrototypeIsPrototypeOf(DatePrototype, value)) {
+ if (value instanceof Date) {
const time = value.valueOf();
const seconds = MathTrunc(time / 1e3);
const nanoseconds = MathTrunc(time - (seconds * 1e3)) * 1e6;