nathantsoi / vue-native-websocket

native websocket with vuex integration
944 stars 163 forks source link

Android 4.4 on Coolpad #71

Open zeroprofit opened 5 years ago

zeroprofit commented 5 years ago

Hi,

Line 3 in ./src/Emitter.js is giving me error on Android 4.4.

this.listeners = new Map()

Is there a polyfill or another way than using "new Map()" so it works on Android 4.4?

Thanks !

zeroprofit commented 5 years ago

I solved this problem using a polyfill from "core-js" https://github.com/zloirock/core-js

In main.js, at the top before import Vue from 'vue':

import 'core-js' import Vue from 'vue' import App from './App' import router from './router' import Vant from 'vant' import 'vant/lib/vant-css/index.css' import VueSocketio from 'vue-socket.io'