From 64b8967deda7bd64297ff7a9220708679a61bd94 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 24 Jun 2023 16:03:16 +0530 Subject: [PATCH 1/3] avoid 'Cannot convert undefined or null to object' on android if device is rotated during initial load --- static/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/utils.js b/static/js/utils.js index 2e4147db..68d77359 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -2961,7 +2961,7 @@ pandora.resizeFolders = function(section) { : section == 'edits' ? width - 16 : width - 48 ) - 8); - Ox.forEach(pandora.$ui.folderList, function($list, id) { + pandora.$ui.folderList && Ox.forEach(pandora.$ui.folderList, function($list, id) { var pos = Ox.getIndexById(pandora.site.sectionFolders[section], id); pandora.$ui.folder[pos] && pandora.$ui.folder[pos].css({ width: width + 'px' From 94fc4fbe7ab89a737d8fb8093d3232eab356ceef Mon Sep 17 00:00:00 2001 From: j Date: Sat, 24 Jun 2023 16:13:25 +0530 Subject: [PATCH 2/3] we can only update view if it exists. switch otherwise --- static/js/info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/info.js b/static/js/info.js index 38bcef79..305b40b2 100644 --- a/static/js/info.js +++ b/static/js/info.js @@ -142,7 +142,7 @@ pandora.ui.info = function() { }) .bindEvent({ click: function(data) { - if (ui.item && ['timeline', 'player', 'editor'].indexOf(ui.itemView) > -1) { + if (ui.item && ['timeline', 'player', 'editor'].indexOf(ui.itemView) > -1 && pandora.$ui[ui.itemView]) { pandora.$ui[ui.itemView].options({ position: data.position }); From 69fae04bb8537965b5f6d2196aa112a61c70cce4 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 26 Jun 2023 10:48:38 +0530 Subject: [PATCH 3/3] fall back to use url as is --- pandora/app/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/app/views.py b/pandora/app/views.py index b6337b4b..411fb813 100644 --- a/pandora/app/views.py +++ b/pandora/app/views.py @@ -53,7 +53,10 @@ def embed(request, id): }) def redirect_url(request, url): - url = base64.decodebytes(url.encode()).decode() + try: + url = base64.decodebytes(url.encode()).decode() + except: + pass if settings.CONFIG['site'].get('sendReferrer', False): return redirect(url) else: