From a33b037364d3adc624ba3733fe6d4723c92b324d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 12 Apr 2018 11:55:14 +0200 Subject: [PATCH] Fix ItemListHelper throwing an error on undefined items Just fall back to an empty list. Fixed #2572 (at least the bit that isn't a broken nginx config) --- src/octoprint/static/js/app/helpers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/octoprint/static/js/app/helpers.js b/src/octoprint/static/js/app/helpers.js index 98a1e5741..7517ad1e2 100644 --- a/src/octoprint/static/js/app/helpers.js +++ b/src/octoprint/static/js/app/helpers.js @@ -27,6 +27,7 @@ function ItemListHelper(listType, supportedSorting, supportedFilters, defaultSor }; self.updateItems = function(items) { + if (items === undefined) items = []; self.allItems = items; self.allSize(items.length); self._updateItems();