From d44f5032d0f53256b2d5aef505d6b593fd3cd158 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:14:18 +0800 Subject: fix yari h2m dry run errors (zh-CN) --- .../javascript/reference/operators/optional_chaining/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/operators/optional_chaining/index.html') diff --git a/files/zh-cn/web/javascript/reference/operators/optional_chaining/index.html b/files/zh-cn/web/javascript/reference/operators/optional_chaining/index.html index e765e6d66b..9c3f743c8a 100644 --- a/files/zh-cn/web/javascript/reference/operators/optional_chaining/index.html +++ b/files/zh-cn/web/javascript/reference/operators/optional_chaining/index.html @@ -61,12 +61,12 @@ let nestedProp = ((temp === null || temp === undefined) ? undefined : temp.secon
let result = someInterface.customMethod?.();
-
-

注意: 如果存在一个属性名且不是函数, 使用 ?. 仍然会产生一个 {{JSxRef("TypeError")}} 异常 (x.y is not a function).

+
+

备注:如果存在一个属性名且不是函数, 使用 ?. 仍然会产生一个 {{JSxRef("TypeError")}} 异常 (x.y is not a function).

-
-

注意: 如果 someInterface 自身是 null 或者 undefined ,异常 {{JSxRef("TypeError")}} 仍会被抛出 someInterface is null 如果你希望允许 someInterface 也为 null 或者 undefined ,那么你需要像这样写 someInterface?.customMethod?.()

+
+

备注:如果 someInterface 自身是 null 或者 undefined ,异常 {{JSxRef("TypeError")}} 仍会被抛出 someInterface is null 如果你希望允许 someInterface 也为 null 或者 undefined ,那么你需要像这样写 someInterface?.customMethod?.()

处理可选的回调函数或者事件处理器

-- cgit v1.2.3-54-g00ecf