We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fedbb91 commit 144c271Copy full SHA for 144c271
lib/serializer.js
@@ -89,7 +89,9 @@ module.exports = class Serializer {
89
90
asString (str) {
91
const len = str.length
92
- if (len < 42) {
+ if (len === 0) {
93
+ return '""'
94
+ } else if (len < 42) {
95
// magically escape strings for json
96
// relying on their charCodeAt
97
// everything below 32 needs JSON.stringify()
0 commit comments