[BUGFIX] Test typeof TBE_EDITOR for object not function 10/28810/2
authorAlexander Opitz <opitz.alexander@googlemail.com>
Tue, 25 Mar 2014 15:02:52 +0000 (16:02 +0100)
committerNicole Cordes <typo3@cordes.co>
Mon, 31 Mar 2014 21:12:38 +0000 (23:12 +0200)
As TBE_EDITOR is defined as object in jsfunc.tbe_editors.js we should
change the check here. Otherwise no eval user functions will be called.

Resolves: #57296
Releases: 6.2, 6.1
Change-Id: Ie1b701dcbf465827bc336233c2523f4df1dde9ba
Reviewed-on: https://review.typo3.org/28810
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
t3lib/jsfunc.evalfield.js

index 48c5828..4983295 100644 (file)
@@ -62,7 +62,7 @@ function evalFunc_evalObjValue(FObj,value) {
        var theEvalType = (FObj.evallist) ? this.split(evallist, ",", index) : false;
        var newValue=value;
        while (theEvalType) {
-               if (typeof TBE_EDITOR == 'function' && TBE_EDITOR.customEvalFunctions[theEvalType] && typeof TBE_EDITOR.customEvalFunctions[theEvalType] == 'function') {
+               if (typeof TBE_EDITOR == 'object' && TBE_EDITOR.customEvalFunctions[theEvalType] && typeof TBE_EDITOR.customEvalFunctions[theEvalType] == 'function') {
                        newValue = TBE_EDITOR.customEvalFunctions[theEvalType](newValue);
                } else {
                        newValue = evalFunc.input(theEvalType, newValue);