Skip to content

Commit

Permalink
fix: update css2json and fix #7
Browse files Browse the repository at this point in the history
修复页面卡死问题(#7)
  • Loading branch information
yanglbme committed Dec 29, 2019
1 parent 5aa280d commit 983e635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/scripts/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function css2json(css) {
// 初始化返回值
let json = {};

while (css.length > 0) {
while (css.length > 0 && (css.indexOf('{') !== -1) && (css.indexOf('}') !== -1)) {
// 存储第一个左/右花括号的下标
const lbracket = css.indexOf('{');
const rbracket = css.indexOf('}');
Expand Down

0 comments on commit 983e635

Please sign in to comment.