Skip to content

Commit

Permalink
[fix] Remove useless "replace" function
Browse files Browse the repository at this point in the history
This line of replace function will make the sign " not working in the formatter string function.

Test it on both debug and release mode and they are working well.

Related issue: #96 (comment)
  • Loading branch information
congshengwu committed Jul 24, 2023
1 parent 5b8d517 commit 80b813c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/util/toString.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export default function toString(obj) {
do {
result = result
.replace('"~--demo--~', "")
.replace('~--demo--~"', "")
.replace(/\\\"/g, '"'); //最后一个replace将release模式中莫名生成的\"转换成"
.replace('~--demo--~"', "");
} while (result.indexOf("~--demo--~") >= 0);
// 添加此行把unicode转为中文(否则formatter函数中含有中文在release版本中显示不出来)
result = unescape(result.replace(/\\u/g, "%u"));
Expand Down

0 comments on commit 80b813c

Please sign in to comment.