Threaded mode~
This commit is contained in:
5
app/javascript/flavours/glitch/util/js_helpers.js
Normal file
5
app/javascript/flavours/glitch/util/js_helpers.js
Normal file
@@ -0,0 +1,5 @@
|
||||
// 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;
|
||||
}
|
Reference in New Issue
Block a user