seiyable / vue-simple-svg

A simple Vue.js plugin that allows you to load a SVG image as an inline SVG with an access to change its fill colors
MIT License
80 stars 23 forks source link

Issue when loading svg from local filesystem #14

Open daviesdoclc opened 5 years ago

daviesdoclc commented 5 years ago

I'm writing a hybrid app that uses Vue/Vuetify. It loads files from the local filesystem. It would appear the XMLHttpRequest returns request.status 0 in that case. Would it be possible to modify the request.onload to do the following?

if (request.status === 0 || (request.status >= 200 && request.status < 400)) {

Thanks. Super nice vue plugin btw.