[BUGFIX] Unregister formeditor events through off() 73/56673/3
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Mon, 16 Apr 2018 07:33:15 +0000 (09:33 +0200)
committerBenjamin Kott <benjamin.kott@outlook.com>
Tue, 17 Apr 2018 21:55:19 +0000 (23:55 +0200)
Resolves a variable naming collision within the formeditor model method
off() to make it possible to unregister formeditor events registered
via on().

Releases: master, 8.7
Resolves: #84736
Change-Id: Ia2214a920f034a45e79e0d756985038b41873742
Reviewed-on: https://review.typo3.org/56673
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Kay Strobach <typo3@kay-strobach.de>
Tested-by: Kay Strobach <typo3@kay-strobach.de>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/Core.js

index 965fe93..871b881 100644 (file)
@@ -892,8 +892,8 @@ define(['jquery'], function($) {
           utility().assert(utility().isNonEmptyString(topicName), 'Invalid parameter "topicName"', 1475361760);
 
           if ('array' === $.type(_publisherTopics[key])) {
-            _publisherTopics[key] = _publisherTopics[key].filter(function(topicName) {
-              return topicName !== topicName;
+            _publisherTopics[key] = _publisherTopics[key].filter(function(currentTopicName) {
+              return topicName !== currentTopicName;
             });
           }
         };