diff --git a/lib/compile-vue.js b/lib/compile-vue.js index 3397212..af013f3 100644 --- a/lib/compile-vue.js +++ b/lib/compile-vue.js @@ -54,8 +54,12 @@ function scopeCss(css = '', hash) { if (last.includes(':')) { let res = V_DEEP.exec(last) if (res) { - last = tmp.pop() - last += `[data-${hash}] ` + res[1] + if (tmp.length) { + last = tmp.pop() + last += `[data-${hash}] ` + } else { + last = res[1] + } } else { if (last.startsWith(':')) { let _prev = tmp.pop() diff --git a/package.json b/package.json index 174a6ca..45bfbdd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fite", "type": "module", - "version": "0.7.2", + "version": "0.7.3", "bin": { "fite": "index.js" },