From 3c9dcfdcd62301ac158ee86f8347772f9404ab65 Mon Sep 17 00:00:00 2001 From: Cedric Ziel Date: Mon, 6 Oct 2014 15:04:02 +0200 Subject: [PATCH] [BUGFIX] Use hasOwnProperty to prevent JS errors --- Resources/Public/js/fluxCollapse.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Resources/Public/js/fluxCollapse.js b/Resources/Public/js/fluxCollapse.js index c0d6a1472..a9e70c6d5 100644 --- a/Resources/Public/js/fluxCollapse.js +++ b/Resources/Public/js/fluxCollapse.js @@ -47,8 +47,10 @@ FluidTYPO3.Components.FluxCollapse = { fluxGrid.removeClass('flux-grid-hidden'); toggle.replaceClass('t3-icon-view-table-expand', 't3-icon-view-table-collapse'); for (var i in cookie) { - if (cookie[i] == uid) { - delete(cookie[i]); + if (cookie.hasOwnProperty(i)) { + if (cookie[i] == uid) { + delete(cookie[i]); + } } } } else {