Skip to content

Play safe with old global API#178

Open
Amphiluke wants to merge 1 commit intotrevoreyre:masterfrom
Amphiluke:master
Open

Play safe with old global API#178
Amphiluke wants to merge 1 commit intotrevoreyre:masterfrom
Amphiluke:master

Conversation

@Amphiluke
Copy link
Copy Markdown

Vue component throws an exception when using a CDN version of Vue 3.

Screenshot from 2025-01-21 18-15-59

To reproduce the issue, one can just add two scripts on the page: Vue 3 (global build) and the component itself. Here is a demo (open dev tools to see the exception).

The Vue.use() global API was removed in version 3, so a pre-check is required before calling this method. This is what the PR fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant