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

Checking for @type being an array #599

Merged
merged 4 commits into from
Oct 7, 2024
Merged

Checking for @type being an array #599

merged 4 commits into from
Oct 7, 2024

Conversation

egekorkan
Copy link
Member

fixes #598

Copy link

netlify bot commented Oct 2, 2024

Deploy Preview for thingweb-playground ready!

Name Link
🔨 Latest commit 2ccf0d4
🔍 Latest deploy log https://app.netlify.com/sites/thingweb-playground/deploys/66ffe48ae23a9d000821de46
😎 Deploy Preview https://deploy-preview-599--thingweb-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 27 (no change from production)
Accessibility: 79 (no change from production)
Best Practices: 100 (no change from production)
SEO: 73 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@egekorkan
Copy link
Member Author

Gotten a bit rusty and made some mistakes... Will refactor :)

@egekorkan egekorkan merged commit 737ab64 into master Oct 7, 2024
10 checks passed
@egekorkan egekorkan deleted the egekorkan-patch-2 branch October 7, 2024 09:44
return "td";
}
} else {
// then it is an array
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to check for array?

/**
* Checks if the input is a TD or TM
* @param {jsonDocument}
* @returns "tm" or "td"
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to report a unknown value also so the caller can decide what it is defaulting to?

Copy link
Member

@danielpeintner danielpeintner left a comment

Choose a reason for hiding this comment

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

Just some comments

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.

Checking for TM is too restrictive
2 participants