Skip to content

global is undefined #8455

Closed
Closed
@Arichy

Description

@Arichy

Version

2.5.16

Reproduction link

https://jsfiddle.net/50wL7mdz/449624/

Steps to reproduce

When you open it, it will just alert the bug.
And I used document.write to show it on html, though it sometimes doesn't work.

What is expected?

The code should run correctly

What is actually happening?

TypeError happened.


I'm using ES6 syntax import to import Vue.js in Safari (script[type=module]) ,but it seems the module closure makes 'this' of top level point undefined so global becomes undefined rather than window.
In order to show the bug clearly, I used dynamic import instead of static import on JSFiddle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions