Переглянути джерело

Use outstanding isArray function in new render config object code

tags/v4.1.0
Sophie Kirschner Phillip Johnsen 5 роки тому
джерело
коміт
224fe3a23e
3 змінених файлів з 5 додано та 5 видалено
  1. +2
    -2
      mustache.js
  2. +1
    -1
      mustache.min.js
  3. +2
    -2
      mustache.mjs

+ 2
- 2
mustache.js Переглянути файл

@@ -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') {
@@ -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 {


+ 1
- 1
mustache.min.js
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 2
- 2
mustache.mjs Переглянути файл

@@ -672,7 +672,7 @@ Writer.prototype.rawValue = function rawValue (token) {
};

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

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 {


Завантаження…
Відмінити
Зберегти