Quellcode durchsuchen

Merge pull request #380 from skybet/section-with-length-property

Section with "length" property
tags/v1.0.0
David da Silva Contín vor 11 Jahren
Ursprung
Commit
85e43f97d8
4 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
  1. +1
    -1
      mustache.js
  2. +3
    -0
      test/_files/bug_length_property.js
  3. +1
    -0
      test/_files/bug_length_property.mustache
  4. +1
    -0
      test/_files/bug_length_property.txt

+ 1
- 1
mustache.js Datei anzeigen

@@ -368,7 +368,7 @@

while (value != null && index < names.length)
value = value[names[index++]];
} else {
} else if (typeof context.view == 'object') {
value = context.view[name];
}



+ 3
- 0
test/_files/bug_length_property.js Datei anzeigen

@@ -0,0 +1,3 @@
({
length: 'hello'
})

+ 1
- 0
test/_files/bug_length_property.mustache Datei anzeigen

@@ -0,0 +1 @@
{{#length}}The length variable is: {{length}}{{/length}}

+ 1
- 0
test/_files/bug_length_property.txt Datei anzeigen

@@ -0,0 +1 @@
The length variable is: hello

Laden…
Abbrechen
Speichern