Skip to content

Commit

Permalink
Fix runtime error with inputmask
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed Jan 31, 2025
1 parent 57ae2bc commit 9a35af8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/inputmask.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ function init(Survey) {
const updateTextItemPropInfo = function (propJSON) {
const name = propJSON.name;
propJSON.onGetValue = (obj) => {
return obj.editor[name];
return !!obj.editor ? obj.editor[name] : obj[name];
};
propJSON.onSetValue = (obj, val) => {
obj.editor[name] = val;
if(!!obj.editor) {
obj.editor[name] = val;
} else {
obj[name] = val;
}
}
}
const updateColumnPropInfo = function (propJSON) {
Expand Down

0 comments on commit 9a35af8

Please sign in to comment.