Skip to content

Commit

Permalink
fixed error evaluating attributes in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniogarrote committed Sep 9, 2011
1 parent ba0ec70 commit 38989b6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions build/output/knockout-latest.debug.js
Expand Up @@ -1321,10 +1321,11 @@ ko.exportSymbol('ko.jsonExpressionRewriting.insertPropertyReaderWritersIntoJson'
function () {


var evaluatedBindings;
var evaluatedBindings, bindingsToBeEvaluated;
if(typeof(bindings) == 'function') {
viewModel['skonode'] = node;
with(viewModel){ evaluatedBindings = bindings() };
bindingsToBeEvaluated = bindings;
with(viewModel){ evaluatedBindings = bindingsToBeEvaluated() };
} else {
evaluatedBindings = bindings;
}
Expand Down Expand Up @@ -2386,11 +2387,10 @@ sko.Class.check = function(resource) {
sko.log("*** IS INSTANCE OF? "+p);
if(sko.Class.isInstance(resource, p)) {
sko.log("Y!");
//newClasses[p] = true;
resource.classes[p] = true;
if(isFirstRun || resource.classes[p] == null) {
sko.Class.instance(p,resource)
}
resource.classes[p] = true;
} else {
sko.log("N!");
if(resource.classes[p] != null) {
Expand Down
2 changes: 1 addition & 1 deletion build/output/knockout-latest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions deps/sem_ko.js
Expand Up @@ -77,11 +77,10 @@ sko.Class.check = function(resource) {
sko.log("*** IS INSTANCE OF? "+p);
if(sko.Class.isInstance(resource, p)) {
sko.log("Y!");
//newClasses[p] = true;
resource.classes[p] = true;
if(isFirstRun || resource.classes[p] == null) {
sko.Class.instance(p,resource)
}
resource.classes[p] = true;
} else {
sko.log("N!");
if(resource.classes[p] != null) {
Expand Down
5 changes: 3 additions & 2 deletions src/binding/bindingAttributeSyntax.js
Expand Up @@ -38,10 +38,11 @@
function () {


var evaluatedBindings;
var evaluatedBindings, bindingsToBeEvaluated;
if(typeof(bindings) == 'function') {
viewModel['skonode'] = node;
with(viewModel){ evaluatedBindings = bindings() };
bindingsToBeEvaluated = bindings;
with(viewModel){ evaluatedBindings = bindingsToBeEvaluated() };
} else {
evaluatedBindings = bindings;
}
Expand Down

0 comments on commit 38989b6

Please sign in to comment.