Skip to content

Commit

Permalink
Merge pull request #152 from canjs/3.x-fix-refs-scope
Browse files Browse the repository at this point in the history
fixing refs scope logic by removing correct things in production-mode
  • Loading branch information
phillipskevin authored Mar 12, 2018
2 parents d1b24bf + 8f70c11 commit f870ec5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion can-view-scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,30 +183,34 @@ assign(Scope.prototype, {
//!steal-remove-start
var filename = this.peek("scope.filename");
var lineNumber = this.peek("scope.lineNumber");
//!steal-remove-end

if (keyInfo.isLegacyView) {
keyReads[0].key = "view";

//!steal-remove-start
canLog.warn(
(filename ? filename + ':' : '') +
(lineNumber ? lineNumber + ': ' : '') +
"{{>*self}} is deprecated. Use {{>scope.view}} instead."
);
//!steal-remove-end
} else {
keyReads[0] = {
key: keyReads[0].key.substr(1),
at: true
};

//!steal-remove-start
canLog.warn(
(filename ? filename + ':' : '') +
(lineNumber ? lineNumber + ': ' : '') +
"{{*" + keyReads[0].key + "}} is deprecated. Use {{scope.vars." + keyReads[0].key + "}} instead."
);
//!steal-remove-end

keyReads.unshift({ key: 'vars' });
}
//!steal-remove-end
} else {
keyReads = keyReads.slice(1);
}
Expand Down

0 comments on commit f870ec5

Please sign in to comment.