Skip to content

Commit 1f81bc1

Browse files
Adjust uncommon JS style
Co-Authored-By: Michael Schmidt <[email protected]>
1 parent c627a4f commit 1f81bc1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/cli-support/src/js/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2586,7 +2586,7 @@ __wbg_set_wasm(wasm);"
25862586

25872587
// After we've got an actual name handle field projections
25882588
if optional {
2589-
name = format!("typeof {name} === 'undefined' ? null: {name}");
2589+
name = format!("typeof {name} === 'undefined' ? null : {name}");
25902590

25912591
for field in import.fields.iter() {
25922592
name.push_str("?.");

crates/cli/tests/reference/static.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function exported() {
3939
}
4040

4141
export function __wbg_static_accessor_NAMESPACE_OPTIONAL_c9a4344c544120f4() {
42-
const ret = typeof test === 'undefined' ? null: test?.NAMESPACE_OPTIONAL;
42+
const ret = typeof test === 'undefined' ? null : test?.NAMESPACE_OPTIONAL;
4343
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4444
};
4545

@@ -49,7 +49,7 @@ export function __wbg_static_accessor_NAMESPACE_PLAIN_784c8d7f5bbac62a() {
4949
};
5050

5151
export function __wbg_static_accessor_NESTED_NAMESPACE_OPTIONAL_a414abbeb018a35a() {
52-
const ret = typeof test1 === 'undefined' ? null: test1?.test2?.NESTED_NAMESPACE_OPTIONAL;
52+
const ret = typeof test1 === 'undefined' ? null : test1?.test2?.NESTED_NAMESPACE_OPTIONAL;
5353
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5454
};
5555

@@ -59,7 +59,7 @@ export function __wbg_static_accessor_NESTED_NAMESPACE_PLAIN_1121b285cb8479df()
5959
};
6060

6161
export function __wbg_static_accessor_OPTIONAL_ade71b6402851d0c() {
62-
const ret = typeof OPTIONAL === 'undefined' ? null: OPTIONAL;
62+
const ret = typeof OPTIONAL === 'undefined' ? null : OPTIONAL;
6363
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
6464
};
6565

0 commit comments

Comments
 (0)