2 lines
136 B
JavaScript
2 lines
136 B
JavaScript
// Use new value only if old value is undefined
|
|
export const mergeDefined = (oldVal, newVal) => oldVal === undefined ? newVal : oldVal;
|