Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Unable to set desired context using mustache #with

$
0
0
This is a known bug in 2.0.7 (filed by yours truly, in fact)


If there's a reason you can't work around, say with  {{#map.a}}, you can apply this diff on the canjs source:
  1. diff --git a/compute/compute.js b/compute/compute.js

    index d6c7c70..2bd226d 100644

    --- a/compute/compute.js

    +++ b/compute/compute.js

    @@ -412,6 +412,9 @@ steal('can/util', 'can/util/bind', 'can/util/batch', function (can, bind) {

                            prev,

                            // `foundObs` did we find an observable.

                            foundObs;

    +               while(cur.isComputed) {

    +                       cur = cur();

    +               }

                    for (var i = 0, readLength = reads.length; i < readLength; i++) {

                            // Update what we are reading from.

                            prev = cur;


Viewing all articles
Browse latest Browse all 3491

Trending Articles