From 78c04523c055a688ce6d47552161893aa68192f5 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 31 Jan 2021 16:46:33 +0100 Subject: [PATCH] Prevent some more errors --- src/ext/lib/uwui/PlayerUI.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ext/lib/uwui/PlayerUI.js b/src/ext/lib/uwui/PlayerUI.js index 88fc206..dbab156 100644 --- a/src/ext/lib/uwui/PlayerUI.js +++ b/src/ext/lib/uwui/PlayerUI.js @@ -86,7 +86,11 @@ class PlayerUi extends UI { //#region lifecycle replace(playerElement) { - super.replace(this.getUiConfig(playerElement)); + try { + super.replace(this.getUiConfig(playerElement)); + } catch (e) { + this.logger.log('error', 'Couldn\'t replace player element for ui. Error:', e); + } } //#endregion }