[BUGFIX] Unregister formeditor events through off() 17/56717/2
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 22:04:51 +0000 (00:04 +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/56717
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 1ec7ee5..9dfcb0f 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;
             });
           }
         };