Use newer API for Custom MDB, Fix profile bug.

This commit is contained in:
DitFranXX
2020-12-11 17:48:27 +09:00
parent 5d52767f0a
commit 8db9d98b2b
8 changed files with 117 additions and 77 deletions
+7
View File
@@ -10,3 +10,10 @@ export const getVersion = (info: EamuseInfo) => {
const moduleName: string = info.module;
return moduleName.match(/([^_]*)_(.*)/)[1];
};
export function isRequiredVersion(major: number, minor: number) {
// version value exposed since Core v1.19
const core_major = typeof CORE_VERSION_MAJOR === "number" ? CORE_VERSION_MAJOR : 1
const core_minor = typeof CORE_VERSION_MINOR === "number" ? CORE_VERSION_MINOR : 18
return core_major >= major && core_minor >= minor
}