mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Fix web export infinite reload issue
(cherry picked from commit 4431af9153)
This commit is contained in:
7
misc/dist/html/full-size.html
vendored
7
misc/dist/html/full-size.html
vendored
@@ -164,10 +164,11 @@ const engine = new Engine(GODOT_CONFIG);
|
||||
new Promise((resolve) => {
|
||||
setTimeout(() => resolve(), 2000);
|
||||
}),
|
||||
]).catch((err) => {
|
||||
console.error('Error while registering service worker:', err);
|
||||
}).then(() => {
|
||||
]).then(() => {
|
||||
// Reload if there was no error.
|
||||
window.location.reload();
|
||||
}).catch((err) => {
|
||||
console.error('Error while registering service worker:', err);
|
||||
});
|
||||
} else {
|
||||
// Display the message as usual
|
||||
|
||||
@@ -217,6 +217,9 @@ Error EditorExportPlatformWeb::_add_manifest_icon(const String &p_path, const St
|
||||
}
|
||||
|
||||
Error EditorExportPlatformWeb::_build_pwa(const Ref<EditorExportPreset> &p_preset, const String p_path, const Vector<SharedObject> &p_shared_objects) {
|
||||
List<String> preset_features;
|
||||
get_preset_features(p_preset, &preset_features);
|
||||
|
||||
String proj_name = GLOBAL_GET("application/config/name");
|
||||
if (proj_name.is_empty()) {
|
||||
proj_name = "Redot Game";
|
||||
|
||||
Reference in New Issue
Block a user