Comparing version 0.0.3 to 1.0.0
@@ -21,3 +21,3 @@ function $parcel$defineInteropFlag(a) { | ||
async init() { | ||
const { file: file , revision: revision } = this.options; | ||
const { file: file, revision: revision } = this.options; | ||
if (this.isLocalStorage && localStorage.getItem("inlineSVGrev") === revision) { | ||
@@ -30,2 +30,3 @@ const data = localStorage.getItem("inlineSVGdata"); | ||
} | ||
if (document.querySelector("#iconset")) return; | ||
try { | ||
@@ -32,0 +33,0 @@ const response = await fetch(file); |
@@ -11,3 +11,3 @@ class $cf838c15c8b009ba$export$2e2bcd8739ae039 { | ||
async init() { | ||
const { file: file , revision: revision } = this.options; | ||
const { file: file, revision: revision } = this.options; | ||
if (this.isLocalStorage && localStorage.getItem("inlineSVGrev") === revision) { | ||
@@ -20,2 +20,3 @@ const data = localStorage.getItem("inlineSVGdata"); | ||
} | ||
if (document.querySelector("#iconset")) return; | ||
try { | ||
@@ -22,0 +23,0 @@ const response = await fetch(file); |
{ | ||
"name": "iconly", | ||
"version": "0.0.3", | ||
"version": "1.0.0", | ||
"description": "SVG Sprite", | ||
@@ -23,3 +23,3 @@ "author": "ux-ui.pro", | ||
"devDependencies": { | ||
"parcel": "~2.9.2" | ||
"parcel": "~2.9.3" | ||
}, | ||
@@ -26,0 +26,0 @@ "keywords": [ |
@@ -6,2 +6,3 @@ export default class Iconly { | ||
this.body = document.body | ||
this.init().then() | ||
@@ -15,4 +16,6 @@ } | ||
const data = localStorage.getItem('inlineSVGdata') | ||
if (data) { | ||
this.insert(data) | ||
return | ||
@@ -22,2 +25,4 @@ } | ||
if (document.querySelector('#iconset')) return | ||
try { | ||
@@ -31,2 +36,3 @@ const response = await fetch(file) | ||
const data = await response.text() | ||
this.insert(data) | ||
@@ -33,0 +39,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
18418
130
1