Skip to content

Commit 1669c66

Browse files
committed
fix(oxlint): Math.trunc()
1 parent 2c171c4 commit 1669c66

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/composables/hover_highlight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function useHoverhighlight() {
2828
}
2929

3030
block_ids = (Array.isArray(block_ids) ? block_ids : [])
31-
.map((blockId) => Number.parseInt(blockId, 10))
31+
.map((blockId) => Math.trunc(Number(blockId)))
3232
.filter((blockId) => !Number.isNaN(blockId));
3333

3434
if (currentId !== id) {

app/stores/data.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@ export const useDataStore = defineStore("data", () => {
178178

179179
async function getAllModelComponentsViewerIds(modelId) {
180180
const components = await model_components_db.where("id").equals(modelId).toArray();
181-
return components.map((component) => Number.parseInt(component.viewer_id, 10));
181+
return components.map((component) => Math.trunc(Number(component.viewer_id)));
182182
}
183183

184184
async function getMeshComponentsViewerIds(modelId, meshComponentGeodeIds) {
185185
const components = await model_components_db
186186
.where("[id+geode_id]")
187187
.anyOf(meshComponentGeodeIds.map((geode_id) => [modelId, geode_id]))
188188
.toArray();
189-
return components.map((component) => Number.parseInt(component.viewer_id, 10));
189+
return components.map((component) => Math.trunc(Number(component.viewer_id)));
190190
}
191191

192192
async function exportStores() {

0 commit comments

Comments
 (0)