Vue Onsen Android back button
-
Hi, I’m trying to make my app get to the previous page using the android button and not the v-ons-back-button but it doesn’t seem to work. Is there something I missed out on?
Currently I got a message saying ‘Uncaught ReferenceError: Symbol is not defined’ in the console when pressing the back button on my phone.
I’m using :
- onsenui@2.2.5
- vue@2.3.0
- vue-onsenui@2.0.0-beta.3
-
@Adi-Abdullah Hi! Thanks for reporting. I’ll try to have a look at it tomorrow. I haven’t tried
vue@2.3.0
yet, not sure if it is related to that.
-
@Fran-Diox
I found that this error occurred because:- We are using
for-of
syntax inutil._captureTree
(link). for-of
syntax is transpiled by Babel.- But
babel-plugin-transform-es2015-for-of
outputs code withSymbol
(link)Symbol
is a feature of ES2015, so this might be a bug
Symbol
is supported since Android 5.1 WebView (link).
What we could do is (1) polyfill
Symbol
or (2) fixbabel-plugin-transform-es2015-for-of
.
- We are using
-
@asial-matagawa Oh, thanks for checking! I saw that the latest Vue release mentioned something related to
Symbol
and thought that it might affect.
Maybe we can simply removefor of
, I don’t really mind :)
-
@Fran-Diox Are there any temporary solution for this? Or I can expect a patch up for this soon? :confused: Plus do I need to create an issue for this ? I’m quite new so bear with me on this haha
-
@Adi-Abdullah It’s already fixed so no need to open an issue. I think we will release
onsenui@2.2.6
either today or tomorrow. Otherwise, you can download the latest development version from this link :)
-
Thanks so much @Fran-Diox on the fast response :+1: :+1: Just tested, its working now :relaxed: