From 85c679844869b6b05fcbda231d8dc7026a66da97 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 18 Jun 2024 13:06:00 +0100 Subject: [PATCH] fix: Make polyfilled import.meta.filename getter a valid function --- run-selfhosted.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-selfhosted.js b/run-selfhosted.js index a4540b71..bc0221ce 100644 --- a/run-selfhosted.js +++ b/run-selfhosted.js @@ -55,7 +55,7 @@ const surrounding_box = (col, lines) => { // Annoying polyfill for inconsistency in different node versions if ( ! import.meta.filename ) { Object.defineProperty(import.meta, 'filename', { - get: import.meta.url.slice('file://'.length), + get: () => import.meta.url.slice('file://'.length), }) }