From 98d55c922ec6b0ba8288af221cb82835331eae7f Mon Sep 17 00:00:00 2001 From: Olmo Maldonado Date: Wed, 1 Apr 2009 01:43:34 -0700 Subject: [PATCH] Forgot a check for getLast --- Source/Native/Array.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Native/Array.js b/Source/Native/Array.js index ecbd4263..085e2f62 100644 --- a/Source/Native/Array.js +++ b/Source/Native/Array.js @@ -78,7 +78,7 @@ Array.implement({ }, getLast: function(){ - return this[this.length - 1]; + return (this.length) ? this.item(-1) : null; }, getRandom: function(){ -- 2.11.4.GIT