From b649f17d9d489e8ed41bfbdd7f4be461de8820fb Mon Sep 17 00:00:00 2001 From: scottjehl Date: Sun, 17 Apr 2011 12:11:03 -0700 Subject: [PATCH] one call to $.type --- js/jquery.mobile.navigation.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 3698bae2..e786827e 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -321,9 +321,10 @@ // changepage function $.mobile.changePage = function( to, transition, reverse, changeHash, fromHashChange ){ //from is always the currently viewed page - var toIsArray = $.type(to) === "array", - toIsObject = $.type(to) === "object", - from = toIsArray ? to[0] : $.mobile.activePage; + var toType = $.type(to), + toIsArray = toType === "array", + toIsObject = toType === "object", + from = toIsArray ? to[0] : $.mobile.activePage; to = toIsArray ? to[1] : to;