-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: don't try to deepMerge read-only properties #14206
base: 2.5
Are you sure you want to change the base?
Conversation
Does not work, unfortunately. I suppose that instead of or in addition to the source property, the target property needs to be taken into account: // ensure the property is not read-only, if so skip it.
if (!Object.getOwnPropertyDescriptor(source, key).writable) {
return;
}
const targetProperty = Object.getOwnPropertyDescriptor(target, key);
const targetReadonly = targetProperty !== undefined && !targetProperty.writable
if (targetReadonly) {
return;
}
if (
Array.isArray(target[key]) && Array.isArray(source[key]) ||
isSimpleObject(target[key]) && isSimpleObject(source[key])
) {
deepMerge(target[key], source[key]);
} else if (source[key] !== undefined && source[key] !== null) {
print("Key: " + key);
print("Source: "); printObject(Object.getOwnPropertyDescriptor(source, key));
print("Target: "); printObject(Object.getOwnPropertyDescriptor(target, key))
Object.assign(target, {[key]: source[key]});
} Result:
So the property is |
Yes, of course...
Note quite sure, though its probably a missing Qt feature... mixxx/src/controllers/scripting/legacy/scriptconnectionjsproxy.h Lines 11 to 12 in 675d427
In that case, a try catch is probably better. |
try the newest commit please. |
The |
yeah... |
The DDM4000 mapping has the concept of an Active layer, i.e. a I observe that this works as expected using |
Some more details:
LodashContent of active layer after unshift: Log:
deepMergeContent of active layer after unshift: Log:
|
Fixes #14197
Please confirm @git-developer