mirror of
https://iceshrimp.dev/blueb/Chuckya-fe-standalone.git
synced 2026-01-11 21:43:15 -08:00
5 lines
242 B
JavaScript
5 lines
242 B
JavaScript
// This function returns the new value unless it is `null` or
|
|
// `undefined`, in which case it returns the old one.
|
|
export function overwrite (oldVal, newVal) {
|
|
return newVal === null || typeof newVal === 'undefined' ? oldVal : newVal;
|
|
}
|