Skip to content

Commit

Permalink
fix: Restore compatibility with IE11
Browse files Browse the repository at this point in the history
  • Loading branch information
prantlf committed Dec 27, 2019
1 parent ded734f commit 55b8a48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
var i = 0
var length = 0
var indentString = indent !== undefined
? typeof indent === 'number'
? ' '.repeat(indent) : indent : ' '
? typeof indent === 'number'
? new Array(indent + 1).join(' ') : indent : ' '
var outputString = ''
var indentLevel = 0
var inString
Expand Down
2 changes: 1 addition & 1 deletion lib/printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

var indentString = options.indent
if (typeof indentString === 'number') {
indentString = ' '.repeat(indentString)
indentString = new Array(indentString + 1).join(' ')
}
// Setting the indent to an empty string enables pretty-printing too.
// It will just insert line breaks without any indentation.
Expand Down

0 comments on commit 55b8a48

Please sign in to comment.