[BUGFIX] Page-Tree context menu uses prototype.js functionality 14/34214/2
authorOliver Hader <oliver@typo3.org>
Sat, 15 Nov 2014 17:43:50 +0000 (18:43 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 15 Nov 2014 18:29:07 +0000 (19:29 +0100)
Replace Array.last() call with native JavaScript.

Resolves: #62994
Releases: master
Change-Id: I15a5c9021bde59511bb9ac3fc43cee26c7c36b3e
Reviewed-on: http://review.typo3.org/34214
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/js/extjs/components/pagetree/javascript/contextmenu.js

index ee57739..44eea13 100644 (file)
@@ -172,7 +172,7 @@ TYPO3.Components.PageTree.ContextMenu = Ext.extend(Ext.menu.Menu, {
                }
 
                        // remove divider if it's the last item of the context menu
-               if (components.last() === '-') {
+               if (components[components.length - 1] === '-') {
                        components[components.length - 1] = '';
                }