chore: prefer nullish coalescing (#7125)
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ export function get(object: any, path: string): any {
|
||||
let result = object;
|
||||
|
||||
keys.forEach((key) => {
|
||||
result = isDef(result[key]) ? result[key] : '';
|
||||
result = result[key] ?? '';
|
||||
});
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user