mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: delay version logging & prevent duplicates (#2770)
This commit is contained in:
parent
62f1ed74f1
commit
adcd28f348
2 changed files with 17 additions and 3 deletions
|
@ -364,6 +364,8 @@ export const nFormatter = (num: number, digits: number): string => {
|
|||
};
|
||||
|
||||
export const getVersion = () => {
|
||||
const version = document.querySelector('meta[name="version"]');
|
||||
return version ? (version as any).content : DEFAULT_VERSION;
|
||||
return (
|
||||
document.querySelector<HTMLMetaElement>('meta[name="version"]')?.content ||
|
||||
DEFAULT_VERSION
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue