javascript - Handlebars sometimes not print {{this}} in each helper -


I repeat an object and try to print the value of the object and sometimes it works and Sometimes this does not happen. It is mainly in Chrome and Firefox and IE9 is working as it should be. Either way the function is different from handlers when it works and when it does not happen. Data is the same for both times. When I use the log assistant to print {{this}}, I can see the right price print in the console.

If you are wondering what is underscores, then it is a simple helper and whenever I remove it, it is not any different.

Backbone, Handlebars and My application using JS required

If someone came to any such issue or knew how it was decided, then it would be very helpful.

The data structure is as follows

  var Errors = {"Custom_agent": "You can not be an agent.", "Min_length": "Business must have at least 2 characters should be there." };  

The handlar code is as follows

  {{# error_message}} & lt; Span class = "error - {{format @key" underscoretodash "}}" & gt; {{This}} {{log in}} & lt; / Span & gt; {{/ Every}}  

The handlabar work done is as follows.

Works. *** "Invalid branch" Handlebars.js: 469 *** Program: "Function Program 8 (Depth, Data) {var Buffer =" ", Assistant, Option; Buffer + = "\ N & lt; Span class = \ "error-" + escapeExpression (help = helpers.format || (depth 0 and depth0.format), option = {hash: {}, data: data}, helper? Helper.call (depth 0 , (Data == zero) data === false data: data. Ki), "underscoredotash", options: Helper MissingCol (depth 0, "format", (data == empty) data === incorrect data : Data. Ki), "underscoredotash", option)) + "\" & gt; "+ EscapeExpression ((typeof depth0 === functionType? Depth = .apply (depth0): depth0))" + & lt; / Span & gt; \ N "; Refund buffer;}"

does not work

  *** "Invalid branch." Handlebars.js: 468 *** Program: "Function Program 8 (Depth, Data) {var Buffer =" ", Stack 1, Assistant, Option; buffer + =" \ n & lt; Span class = \ "error-" + escapeExpression ((support = helpers.format || (depth 0 and depth0.format), option = {hash: {}, data: data}, helper.cell (depth) 0, (data == empty || data == = wrong: data: data key), "underscoredot", options): Helper MissingCol (depth 0, "format", (data == empty || data === Wrong data: data. Ki), "underscoredotash", option))); + (If helper = helpers.undefined) {stack1 = helper.call (depth0, {hash: {}, data: data})}} {{helper = (depth0 & amp;; & amp;;; depth0.undefined); Stack1 = typeof assistant === functionType? Helper.call (depth 0, {hash: {}, data: data}): helper;} buffer + = escapation (stack1) + " \ n"; Return buffer;} " 

It seems a bug of HB {{this}} To determine the type of.

  {{for    
  {{this}} < / P>   ./this}}  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -