forked from open-webui/open-webui
chore: version check refac
This commit is contained in:
parent
cc49e0d10f
commit
b777b6d2aa
5 changed files with 56 additions and 35 deletions
|
@ -100,3 +100,13 @@ export const copyToClipboard = (text) => {
|
|||
}
|
||||
);
|
||||
};
|
||||
|
||||
export const checkVersion = (required, current) => {
|
||||
return (
|
||||
current.localeCompare(required, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: 'case',
|
||||
caseFirst: 'upper'
|
||||
}) < 0
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue