From 878b97e103f7b715ab6cdc79040522389734c9f2 Mon Sep 17 00:00:00 2001 From: obiot Date: Wed, 26 Dec 2012 15:24:36 +0800 Subject: [PATCH] Fixed the me.game.getEntityByName when using camelcase names --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index ab1adad983..f6d35cb0c6 100755 --- a/src/core.js +++ b/src/core.js @@ -1328,7 +1328,7 @@ var me = me || {}; var objList = []; entityName = entityName.toLowerCase(); for (var i = gameObjects.length, obj; i--, obj = gameObjects[i];) { - if(obj.name == entityName) { + if(obj.name && obj.name.toLowerCase() === entityName) { objList.push(obj); } }