Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working on ios9 safari #116

Closed
Rockcookies opened this issue Sep 5, 2019 · 6 comments · Fixed by #218
Closed

not working on ios9 safari #116

Rockcookies opened this issue Sep 5, 2019 · 6 comments · Fixed by #218
Labels
not-reproducible Issue cannot be reproduced by members as described question

Comments

@Rockcookies
Copy link

Hello,

I found a critical bug with composition-api on iOS 9 Safari. The problem is that the page can't be loaded but setup function is invoked.

Any help is appreciated, I spent some time on debuging this and it's only happening on iOS 9 devices. On iOS 8 devices it's working, but the loading is extremely long.

@liximomo liximomo added not-reproducible Issue cannot be reproduced by members as described question labels Sep 5, 2019
@liximomo
Copy link
Member

liximomo commented Sep 5, 2019

Can you provide more information? Any logs in the safari console? A minimal example is also required.

@Rockcookies
Copy link
Author

Rockcookies commented Sep 5, 2019

here: https://github.com/Rockcookies/vue-composition-api-ios9

my code:
image

in my android 4.4:
image

in my ios 9.3.4:
image

@F-happy
Copy link

F-happy commented Sep 6, 2019

@Rockcookies you need Reflect polyfill

@zhiquan-yu
Copy link

@Rockcookies
Add import 'core-js/features/reflect/own-keys' in your index.js, because composition-api uses Reflect which not work on iOS 9

@HcySunYang
Copy link
Member

The problem is caused here: https://github.com/vuejs/composition-api/blob/master/src/utils.ts#L5

In IOS 9, we should check hasSymbol with:

export const hasSymbol =
    typeof Symbol !== 'undefined' && isNative(Symbol) &&
    typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);

This code is copied from vue.

HcySunYang added a commit to HcySunYang/vue-function-api that referenced this issue Dec 30, 2019
liximomo pushed a commit that referenced this issue Dec 31, 2019
@zhiquan-yu
Copy link

@liximomo please publish a patch version

pikax pushed a commit to pikax/vue-function-api that referenced this issue Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-reproducible Issue cannot be reproduced by members as described question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants