Skip to content

Commit b649f17

Browse files
author
scottjehl
committed
one call to $.type
1 parent 8c71ee5 commit b649f17

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

js/jquery.mobile.navigation.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,10 @@
321321
// changepage function
322322
$.mobile.changePage = function( to, transition, reverse, changeHash, fromHashChange ){
323323
//from is always the currently viewed page
324-
var toIsArray = $.type(to) === "array",
325-
toIsObject = $.type(to) === "object",
326-
from = toIsArray ? to[0] : $.mobile.activePage;
324+
var toType = $.type(to),
325+
toIsArray = toType === "array",
326+
toIsObject = toType === "object",
327+
from = toIsArray ? to[0] : $.mobile.activePage;
327328

328329
to = toIsArray ? to[1] : to;
329330

0 commit comments

Comments
 (0)