Skip to content

Commit 227d512

Browse files
authored
Merge pull request #131 from HimeShaman/fix-tutorial-console-error
fix: Fixes error displayed in the console when there is no tutorial property in map
2 parents c0b6b66 + 5443d56 commit 227d512

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)