Skip to content

Commit

Permalink
preserve compatibility of quote_style (#4845)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl authored Apr 6, 2021
1 parent 4870747 commit 73a5643
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ function OutputStream(options) {
}

var quote_string = [
function(str, quote, dq, sq) {
return dq > sq ? quote_single(str) : quote_double(str);
},
null,
quote_single,
quote_double,
function(str, quote) {
return quote == "'" ? quote_single(str) : quote_double(str);
},
][options.quote_style];
][options.quote_style] || function(str, quote, dq, sq) {
return dq > sq ? quote_single(str) : quote_double(str);
};

function make_string(str, quote) {
var dq = 0, sq = 0;
Expand Down

0 comments on commit 73a5643

Please sign in to comment.