Skip to content

Commit

Permalink
Use outstanding isArray function in new render config object code
Browse files Browse the repository at this point in the history
  • Loading branch information
pineapplemachine authored and phillipj committed Oct 22, 2020
1 parent 862e497 commit 224fe3a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mustache.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@
};

Writer.prototype.getConfigTags = function getConfigTags (config) {
if (Array.isArray(config)) {
if (isArray(config)) {
return config;
}
else if (config && typeof config === 'object') {
Expand All @@ -691,7 +691,7 @@
};

Writer.prototype.getConfigEscape = function getConfigEscape (config) {
if (config && typeof config === 'object' && !Array.isArray(config)) {
if (config && typeof config === 'object' && !isArray(config)) {
return config.escape;
}
else {
Expand Down
Loading

0 comments on commit 224fe3a

Please sign in to comment.