Skip to content

TypeError: Right-hand side of 'instanceof' is not an object #201

@simplexag

Description

@simplexag

I keep getting the following error

shp.js?t=1699109482459:14409 Uncaught (in promise) TypeError: Right-hand side of 'instanceof' is not an object
at isArrayBuffer (shp.js?t=1699109482459:14409:22)
at toBuffer (shp.js?t=1699109482459:14397:11)
at shp.parseShp (shp.js?t=1699109482459:14538:13)

Using Vue 3

 methods: {
    async openZip() {  
    var reader = new FileReader();
      reader.readAsArrayBuffer(this.file[0]);
      reader.onload = () => {
        this.parseShape(reader.result);
      }
    },
    async parseShape(data) {
        shp.parseShp(data).then(geojson => {
          console.log(geojson); 
        })

    },
  }

Thank you for any help!

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