Kaynağa Gözat

fix json filter indent arg

Evan You 11 yıl önce
ebeveyn
işleme
f1c6f7cc15
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      src/filters/index.js

+ 1 - 1
src/filters/index.js

@@ -7,7 +7,7 @@ var _ = require('../util')
  */
 
 exports.json = function (value, indent) {
-  return JSON.stringify(value, null, indent || 2)
+  return JSON.stringify(value, null, Number(indent) || 2)
 }
 
 /**