summaryrefslogtreecommitdiff
path: root/runtime/js/30_fs.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-01-27 16:27:22 +0100
committerGitHub <noreply@github.com>2022-01-27 16:27:22 +0100
commitf248e6f1778dc26db91d3322de2ecca5d1aa9866 (patch)
tree46b1ff59091cc8d31ff67427173d3a0148734007 /runtime/js/30_fs.js
parent382a978859a7a7a4351542be818bb2e59523429c (diff)
Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)
This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
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;