Permalink
Browse files

Use typeof as an operator rather than as a function

  • Loading branch information...
1 parent 90eb70f commit bef9e5af1a595cf2f0885a6c5f829fe1633e14b3 @yuvipanda yuvipanda committed Apr 13, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 assets/www/ios/platform.js
  2. +1 −1 assets/www/js/chrome.js
@@ -154,7 +154,7 @@ chrome.doScrollHack = function(element, leaveInPlace, offset) {
$el[0].scroller = scroller;
}
if (!leaveInPlace) {
- if(typeof(offset) !== 'undefined') {
+ if(typeof offset !== 'undefined') {
offset = offset - $("#menu").height();
scroller.scrollTo(0, offset || 0, 200, true);
} else {
View
@@ -309,7 +309,7 @@ window.chrome = function() {
// Reset scroll unless asked otherwise
if (!leaveInPlace) {
// offset is relative, make it absolute
- if(typeof(offset) !== 'undefined') {
+ if(typeof offset !== 'undefined') {
var absoluteOffset = $(element).scrollTop() + offset - $("#menu").height();
$(element).scrollTop(absoluteOffset);
} else {

0 comments on commit bef9e5a

Please sign in to comment.