fix imports

This commit is contained in:
Fine Archs 2024-09-11 08:21:02 +09:00
parent 2c1da1c324
commit 51a66ae328
2 changed files with 8 additions and 1 deletions

View File

@ -5,7 +5,13 @@
import * as mfm from 'mfm-js';
import * as Misskey from 'misskey-js';
import { safeParseFloat } from './safe-parse.js';
function safeParseFloat(str: unknown): number | null {
if (typeof str !== 'string' || str === '') return null;
const num = parseFloat(str);
if (isNaN(num)) return null;
return num;
}
export function shouldCollapseLegacy(note: Misskey.entities.Note, urls: string[]): boolean {
const collapsed = note.cw == null && (

View File

@ -34,6 +34,7 @@
],
"dependencies": {
"misskey-js": "workspace:*",
"mfm-js": "0.24.0",
"vue": "3.4.37"
}
}