Skip to content

Commit 85c6798

Browse files
committed
fix: Make polyfilled import.meta.filename getter a valid function
1 parent 7eabb43 commit 85c6798

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run-selfhosted.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const surrounding_box = (col, lines) => {
5555
// Annoying polyfill for inconsistency in different node versions
5656
if ( ! import.meta.filename ) {
5757
Object.defineProperty(import.meta, 'filename', {
58-
get: import.meta.url.slice('file://'.length),
58+
get: () => import.meta.url.slice('file://'.length),
5959
})
6060
}
6161

0 commit comments

Comments
 (0)