fix: parser not saving unlimited attempts (#483)
* fix: default settings not loading for new problems * fix: unlimited attempts not saving
This commit is contained in:
@@ -6,7 +6,9 @@ export const popuplateItem = (parentObject, itemName, statekey, metadata, defaul
|
||||
let parent = parentObject;
|
||||
const item = _.get(metadata, itemName, null);
|
||||
const equalsDefault = item === defaultValue;
|
||||
if ((!_.isNil(item) || allowNull) && !equalsDefault) {
|
||||
if (allowNull) {
|
||||
parent = { ...parentObject, [statekey]: item };
|
||||
} else if (!_.isNil(item) && !equalsDefault) {
|
||||
parent = { ...parentObject, [statekey]: item };
|
||||
}
|
||||
return parent;
|
||||
|
||||
Reference in New Issue
Block a user