Skip to content

Commit 5443d56

Browse files
author
Benedicte Quimbert
committed
fix: Fixes error displayed in the console when the tutorial property is not defined
1 parent 4fd910d commit 5443d56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Features/tutorial.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function initTutorial(): Promise<void> {
1212
const tutorialProperty = await map.properties?.find(
1313
(property: ITiledMapProperty) => property.name === "tutorial",
1414
);
15-
const isTutorialEnabled = tutorialProperty.value ?? false;
15+
const isTutorialEnabled = tutorialProperty && tutorialProperty.value;
1616

1717
if (!tutorialDone && isTutorialEnabled) {
1818
openTutorial(isForMobile);

0 commit comments

Comments
 (0)