Skip to content

Commit 2f81365

Browse files
authored
fix awaited expressions that need parentheses (#4283)
1 parent b39282a commit 2f81365

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* Disallow two-way binding to a variable declared by an `{#await}` block ([#4012](https://github.com/sveltejs/svelte/issues/4012))
66
* Allow access to `let:` variables in sibling attributes on slot root ([#4173](https://github.com/sveltejs/svelte/issues/4173))
7+
* Fix code generation for `await`ed expressions that need parentheses ([#4267](https://github.com/sveltejs/svelte/issues/4267))
78
* Add some more known globals ([#4276](https://github.com/sveltejs/svelte/pull/4276))
89
* Correctly apply event modifiers to `<svelte:body>` events ([#4278](https://github.com/sveltejs/svelte/issues/4278))
910

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"acorn": "^7.1.0",
7171
"agadoo": "^1.1.0",
7272
"c8": "^5.0.1",
73-
"code-red": "0.0.28",
73+
"code-red": "0.0.30",
7474
"codecov": "^3.5.0",
7575
"css-tree": "1.0.0-alpha22",
7676
"eslint": "^6.3.0",

test/js/samples/debug-empty/expected.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class Component extends SvelteComponentDev {
103103
});
104104

105105
const { ctx } = this.$$;
106-
const props = options.props || ({});
106+
const props = options.props || {};
107107

108108
if (/*name*/ ctx[0] === undefined && !("name" in props)) {
109109
console.warn("<Component> was created without expected prop 'name'");

test/js/samples/debug-foo-bar-baz-things/expected.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class Component extends SvelteComponentDev {
210210
});
211211

212212
const { ctx } = this.$$;
213-
const props = options.props || ({});
213+
const props = options.props || {};
214214

215215
if (/*things*/ ctx[0] === undefined && !("things" in props)) {
216216
console.warn("<Component> was created without expected prop 'things'");

test/js/samples/debug-foo/expected.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class Component extends SvelteComponentDev {
198198
});
199199

200200
const { ctx } = this.$$;
201-
const props = options.props || ({});
201+
const props = options.props || {};
202202

203203
if (/*things*/ ctx[0] === undefined && !("things" in props)) {
204204
console.warn("<Component> was created without expected prop 'things'");

test/js/samples/dev-warning-missing-data-computed/expected.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class Component extends SvelteComponentDev {
107107
});
108108

109109
const { ctx } = this.$$;
110-
const props = options.props || ({});
110+
const props = options.props || {};
111111

112112
if (/*foo*/ ctx[0] === undefined && !("foo" in props)) {
113113
console.warn("<Component> was created without expected prop 'foo'");

0 commit comments

Comments
 (0)