-
Notifications
You must be signed in to change notification settings - Fork 642
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
Feat maplib #2679
Feat maplib #2679
Conversation
|
WalkthroughThis pull request introduces a new feature related to maplib. It includes changes to the Changes
|
@@ -31,7 +31,7 @@ function getFeatureID(feature: Feature<Geometries, Properties>, key?: string) { | |||
} | |||
|
|||
// @ts-ignore | |||
if (typeof (feature.properties[key] * 1) === 'number') { | |||
if (!isNaN(feature.properties[key] * 1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change from typeof (feature.properties[key] * 1) === 'number'
to !isNaN(feature.properties[key] * 1)
is a more reliable way to check if the property can be converted to a number. This change improves type checking and prevents potential errors when the property is not a valid number.
[English Template / 英文模板]
🤔 这个变动的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
📝 更新日志
☑️ 请求合并前的自查清单