From 7dcbef1e85a66dbced15942c4f2cf0c627424feb Mon Sep 17 00:00:00 2001 From: pandamicro Date: Mon, 24 Apr 2017 13:57:29 +0800 Subject: [PATCH] Use !!cc.ActionManager to detect existence --- cocos2d/core/CCNode.js | 2 +- cocos2d/core/base-nodes/CCSGNode.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos2d/core/CCNode.js b/cocos2d/core/CCNode.js index 3585afed26..8f5c725e68 100644 --- a/cocos2d/core/CCNode.js +++ b/cocos2d/core/CCNode.js @@ -45,7 +45,7 @@ var ERR_INVALID_NUMBER = CC_EDITOR && 'The %s is invalid'; var Misc = require('./utils/misc'); //var RegisteredInEditor = Flags.RegisteredInEditor; -var ActionManagerExist = cc.ActionManager !== undefined; +var ActionManagerExist = !!cc.ActionManager; var emptyFunc = function () {}; /** diff --git a/cocos2d/core/base-nodes/CCSGNode.js b/cocos2d/core/base-nodes/CCSGNode.js index 1d5c21fc1e..1e9a2d16b2 100644 --- a/cocos2d/core/base-nodes/CCSGNode.js +++ b/cocos2d/core/base-nodes/CCSGNode.js @@ -24,7 +24,7 @@ THE SOFTWARE. ****************************************************************************/ -var ActionManagerExist = cc.ActionManager !== undefined; +var ActionManagerExist = !!cc.ActionManager; var emptyFunc = function () {}; /*