Skip to content

Commit

Permalink
refs #18919, fix validity of function scope
Browse files Browse the repository at this point in the history
  • Loading branch information
dylans committed Dec 15, 2016
1 parent dc1cac4 commit 21c3bf8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
14 changes: 6 additions & 8 deletions mvc/_atBindingMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ define([
"./resolve",
"./sync"
], function(array, lang, declare, has, Stateful, resolve, sync){
if(has("mvc-bindings-log-api")){
function getLogContent(/*dojo/Stateful*/ target, /*String*/ targetProp){
var getLogContent = (has("mvc-bindings-log-api")) ? function(/*dojo/Stateful*/ target, /*String*/ targetProp){
return [target._setIdAttr || !target.declaredClass ? target : target.declaredClass, targetProp].join(":");
}
} : "";

function logResolveFailure(target, targetProp){
var logResolveFailure = (has("mvc-bindings-log-api")) ? function(target, targetProp){
console.warn(targetProp + " could not be resolved" + (typeof target == "string" ? (" with " + target) : "") + ".");
}
}
} : "";

function getParent(/*dijit/_WidgetBase*/ w){
// summary:
Expand Down Expand Up @@ -232,8 +230,8 @@ define([
// summary:
// Returns list of all properties that data binding is established with.

if(this._excludes){
return this._excludes; // String[]
if(this._excludes){
return this._excludes; // String[]
}
var list = [];
for(var s in this._atWatchHandles){
Expand Down
16 changes: 7 additions & 9 deletions mvc/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define([
/*=====
mvc = {};
=====*/

/*=====
dojox.mvc.sync.converter = {
// summary:
Expand Down Expand Up @@ -56,14 +56,12 @@ define([

var sync;

if(has("mvc-bindings-log-api")){
function getLogContent(/*dojo/Stateful*/ source, /*String*/ sourceProp, /*dojo/Stateful*/ target, /*String*/ targetProp){
return [
[target.canConvertToLoggable || !target.declaredClass ? target : target.declaredClass, targetProp].join(":"),
[source.canConvertToLoggable || !source.declaredClass ? source : source.declaredClass, sourceProp].join(":")
];
}
}
var getLogContent = (has("mvc-bindings-log-api")) ? function(/*dojo/Stateful*/ source, /*String*/ sourceProp, /*dojo/Stateful*/ target, /*String*/ targetProp){
return [
[target.canConvertToLoggable || !target.declaredClass ? target : target.declaredClass, targetProp].join(":"),
[source.canConvertToLoggable || !source.declaredClass ? source : source.declaredClass, sourceProp].join(":")
];
} : "";

function equals(/*Anything*/ dst, /*Anything*/ src){
// summary:
Expand Down

0 comments on commit 21c3bf8

Please sign in to comment.