chore: prefer nullish coalescing (#7125)

This commit is contained in:
neverland
2020-09-07 20:36:49 +08:00
committed by GitHub
parent c7303786ae
commit 4ffa6ead1e
15 changed files with 27 additions and 37 deletions
+1 -1
View File
@@ -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;