[BUGFIX] Prevent Uncaught TypeError in ClickMenu.js 59/50259/3
authorFrank Naegler <frank.naegler@typo3.org>
Tue, 18 Oct 2016 11:35:55 +0000 (13:35 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 19 Oct 2016 08:55:57 +0000 (10:55 +0200)
This patch prevent an Uncaught TypeError ClickMenu.js.
In case the reloadFrame parameter not exist, the variable res is null.
This is ok, because not in any case the parameter is set.

Resolves: #78329
Releases: master, 7.6
Change-Id: I8590a37c55ed794d62620af4c487b57a972761f7
Reviewed-on: https://review.typo3.org/50259
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Resources/Public/JavaScript/ClickMenu.js

index 176f5f0..150c020 100644 (file)
@@ -102,7 +102,7 @@ define(['jquery'], function($) {
                        // to be reloaded.
                        if (typeof response.items === "undefined") {
                                var res = parameters.match(/&reloadListFrame=(0|1|2)(&|$)/);
-                               if (parseInt(res[1], 0)) {
+                               if (res !== null && parseInt(res[1], 0)) {
                                        top.list_frame.location.reload(true);
                                }
                        } else {