Skip to content

Commit 92fcb54

Browse files
committed
docs(object): fix #1004
1 parent 6ad2407 commit 92fcb54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ const showSplashScreen = response.settings.showSplashScreen ?? true;
885885
const animationDuration = response.settings?.animationDuration ?? 300;
886886
```
887887
888-
上面代码中,`response.settings`如果是`null``undefined`,就会返回默认值300。
888+
上面代码中,如果`response.settings``null``undefined`或者`response.settings.animationDuration``null``undefined`就会返回默认值300。也就是说,这一行代码包括了两级属性的判断
889889
890890
这个运算符很适合判断函数参数是否赋值。
891891

0 commit comments

Comments
 (0)