Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update core.data.js #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions js/core/core.data.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,17 @@ function _fnSetObjectDataFn( mSource )
}
else
{
// If array notation is used, we just want to strip it and use the property name
arrayNotation = aLast.match(__reArray);
var r = val;
if (arrayNotation){
// if array notation, we have to catch the array seperator
var join = arrayNotation[0].substring(1, arrayNotation[0].length-1);
// split into array, if no value set emtpy array
r = val.length > 0 ? val.split(join) : [];
}
// If array notation is used, we just want to strip it and use the property name
// and assign the value. If it isn't used, then we get the result we want anyway
data[ aLast.replace(__reArray, '') ] = val;
data[ aLast.replace(__reArray, '') ] = r;
}
};

Expand Down