mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Track current version (#2731)
This commit is contained in:
parent
3a130cb102
commit
001880ba88
4 changed files with 44 additions and 13 deletions
|
@ -1,6 +1,7 @@
|
|||
import colors from "./colors";
|
||||
import {
|
||||
CURSOR_TYPE,
|
||||
DEFAULT_VERSION,
|
||||
FONT_FAMILY,
|
||||
WINDOWS_EMOJI_FALLBACK_FONT,
|
||||
} from "./constants";
|
||||
|
@ -361,3 +362,8 @@ export const nFormatter = (num: number, digits: number): string => {
|
|||
(num / si[index].value).toFixed(digits).replace(rx, "$1") + si[index].symbol
|
||||
);
|
||||
};
|
||||
|
||||
export const getVersion = () => {
|
||||
const version = document.querySelector('meta[name="version"]');
|
||||
return version ? (version as any).content : DEFAULT_VERSION;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue