Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Fix Leaderboard nulls - #4

Open
McLaynV wants to merge 1 commit into
biggestcookie:mainfrom
McLaynV:fix-leaderboard-nulls
Open

Fix Leaderboard nulls#4
McLaynV wants to merge 1 commit into
biggestcookie:mainfrom
McLaynV:fix-leaderboard-nulls

Conversation

@McLaynV

@McLaynV McLaynV commented Dec 4, 2022

Copy link
Copy Markdown

Fix Leaderboard null errors in the Leaderboard.

These errors occur when running build:client:

> vue-ts-template@1.0.0 build   
> vue-tsc --noEmit && vite build

src/components/Leaderboard.vue:45:30 - error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
  Type 'undefined' is not assignable to type 'number'.

45         {{ msToElapsedString(store.submittedRun?.totalTimeMilliseconds) }}
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/components/Leaderboard.vue:62:21 - error TS2531: Object is possibly 'null'.

62             :class="store.submittedRun.id === result.id ? 'is-selected' : ''"
                       ~~~~~~~~~~~~~~~~~~

src/components/Leaderboard.vue:85:21 - error TS2531: Object is possibly 'null'.

85             :class="store.submittedRun.id === result.id ? 'is-selected' : ''"
                       ~~~~~~~~~~~~~~~~~~


Found 3 errors in the same file, starting at: src/components/Leaderboard.vue:45

Fix Leaderboard nulls
@McLaynV
McLaynV force-pushed the fix-leaderboard-nulls branch from 455b822 to 941c844 Compare January 7, 2023 21:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant