Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Backport: fix set_value for @qooxdoo/framework #831

Merged
merged 3 commits into from
Nov 19, 2021
Merged
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions source/class/qx/tool/config/Abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,15 @@ qx.Class.define("qx.tool.config.Abstract", {
*/
setValue(prop_path, value, options) {
let originalValue = this.getValue(prop_path, options);
set_value(this.getData(), prop_path, value, options);
set_value(this.getData(), prop_path, value, {preservePaths:false});
try {
this.validate();
} catch (e) {
// revert change
if (originalValue === undefined) {
unset_value(this.getData(), prop_path);
} else {
set_value(this.getData(), prop_path, originalValue, options);
set_value(this.getData(), prop_path, originalValue, {preservePaths:false});
}
// throw
throw e;
Expand All @@ -381,7 +381,7 @@ qx.Class.define("qx.tool.config.Abstract", {
this.validate();
} catch (e) {
// revert value
set_value(this.getData(), prop_path, originalValue, options);
set_value(this.getData(), prop_path, originalValue, {preservePaths:false});
// throw
throw e;
}
Expand Down