Explorar el Código

No need to check for property existence.

Paulo Reis hace 10 años
padre
commit
3825111713
Se han modificado 1 ficheros con 1 adiciones y 5 borrados
  1. 1 5
      services/web/public/coffee/main/event.coffee

+ 1 - 5
services/web/public/coffee/main/event.coffee

@@ -17,11 +17,7 @@ define [
 
 		_eventInCache = (key) ->
 			curCache = _getEventCache()
-
-			if (curCache.hasOwnProperty key) 
-				curCache[key]
-			else
-				false
+			curCache[key] || false
 
 		_addEventToCache = (key) ->
 			curCache = _getEventCache()