Skip to content

Edge, IE issue SCRIPT1028: Expected identifier, string or number.  #135

@audetcameron

Description

@audetcameron

we are using babel preset env to compile, however the vue-mapbox issue of the spread operator is causing issues with edge and ie 11.

this file:
/node_modules/vue-mapbox/src/lib/withEvents.js

export default {
  methods: {
    /**
     * Emit Vue event with additional data
     *
     * @param {string} name EventName
     * @param {Object} [data={}] Additional data
     */
    $_emitEvent(name, data = {}) {
      this.$emit(name, {
        map: this.map,
        component: this,
        ...data
      });
    },

    /**
     * Emit Vue event with Mapbox event as additional data
     *
     * @param {Object} event
     */
    $_emitMapEvent(event, data = {}) {
      this.$_emitEvent(event.type, { mapboxEvent: event, ...data });
    }
  }
};

compiled reference {map:this.map,component:this,...e} is where the first issue is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions