diff --git a/ESP32_AP-Flasher/wwwroot/index.html b/ESP32_AP-Flasher/wwwroot/index.html
index 5969fba3..f69af71e 100644
--- a/ESP32_AP-Flasher/wwwroot/index.html
+++ b/ESP32_AP-Flasher/wwwroot/index.html
@@ -6,9 +6,9 @@
Open EPaper Link Access Point
-
-
-
+
+
+
diff --git a/ESP32_AP-Flasher/wwwroot/ota.js b/ESP32_AP-Flasher/wwwroot/ota.js
index 4cb77177..5e054aff 100644
--- a/ESP32_AP-Flasher/wwwroot/ota.js
+++ b/ESP32_AP-Flasher/wwwroot/ota.js
@@ -97,7 +97,7 @@ export async function initUpdate() {
} else {
const release = releaseDetails[0];
if (release?.tag_name) {
- if (parseInt(release.tag_name) == parseInt(currentVer)) {
+ if (normalizeVersion(release.tag_name) === normalizeVersion(currentVer)) {
easyupdate.innerHTML = `Version ${currentVer}. You are up to date`;
} else if (release.date < formatEpoch(currentBuildtime - 30 * 60)) {
easyupdate.innerHTML = `Your version is newer than the latest release date.
Are you the developer? :-)`;
@@ -638,3 +638,7 @@ async function fetchAndCheckTagtypes(cleanup) {
print("Error: " + error, "red");
}
}
+
+function normalizeVersion(version) {
+ return version.replace(/(\.\d*?)0+$/, '$1').replace(/\.$/, '');
+}