Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Andri/last used #2683

Merged
merged 13 commits into from
Nov 21, 2024
Merged

Andri/last used #2683

merged 13 commits into from
Nov 21, 2024

Conversation

LXIF
Copy link
Contributor

@LXIF LXIF commented Nov 1, 2024

Add well-formatted and tested last usage date for each authentication device. This was already PR-ed, this new commit is a fix for the showcase screenshots. last_used is undefined on page load, so it doesn't yet have a length, so querying its length throws an error which broke the showcase. Fixed it by using optional chaining in the if clause in question.

Screenshot 2024-11-01 at 15 28 58
🟡 Some screens were changed

@LXIF LXIF requested a review from a team as a code owner November 1, 2024 14:32
@LXIF LXIF requested a review from lmuntaner November 1, 2024 14:34
@LXIF LXIF added this pull request to the merge queue Nov 21, 2024
Merged via the queue into main with commit 3334e71 Nov 21, 2024
67 checks passed
@LXIF LXIF deleted the andri/last_used branch November 21, 2024 09:30
@@ -129,7 +129,7 @@ export const authenticatorItem = ({
let lastUsageTimeStamp: Date | undefined;
let lastUsageFormattedString: string | undefined;

if (last_usage.length > 0 && typeof last_usage[0] === "bigint") {
if (last_usage?.length > 0 && typeof last_usage[0] === "bigint") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the value is optional, shouldn't you have kept a test that asserts its optionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants