Skip to content

Commit 766e768

Browse files
authored
Fix spin function syntax for Svelte tutorial auto-grader (#626)
Corrected arrow function syntax to include missing parenthesis around the "t" parameter and added semicolon after the last backtick in returned CSS string. The auto-grader expects both.
1 parent a01b542 commit 766e768

File tree

1 file changed

+2
-2
lines changed
  • content/tutorial/02-advanced-svelte/02-transitions/04-custom-css-transitions

1 file changed

+2
-2
lines changed

content/tutorial/02-advanced-svelte/02-transitions/04-custom-css-transitions/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ We can get a lot more creative though. Let's make something truly gratuitous:
5353
function spin(node, { duration }) {
5454
return {
5555
duration,
56-
css: t => +++{
56+
css: (t) => +++{
5757
const eased = elasticOut(t);
5858
5959
return `
@@ -62,7 +62,7 @@ We can get a lot more creative though. Let's make something truly gratuitous:
6262
${Math.trunc(t * 360)},
6363
${Math.min(100, 1000 * (1 - t))}%,
6464
${Math.min(50, 500 * (1 - t))}%
65-
);`
65+
);`;
6666
}+++
6767
};
6868
}

0 commit comments

Comments
 (0)