There is an error in the isMobile() function. The problem is with the following code:

$.each(mobile_devices, function(index, value) {
  if ($.inArray(value, classes) != -1) {
    return true;
  }
});

The return statement is in the scope of the anonymous function passed as the second argument for $.each(), hence the execution of the isMobile() will not terminate, as that is a different scope.

I have fixed the issue, will post a patch in an upcoming comment.

Comments

temaruk’s picture

Assigned: Unassigned » temaruk
Status: Active » Needs review
StatusFileSize
new1.24 KB

Attached the patch, applies against latest dev.

k.dani’s picture

Status: Needs review » Fixed

Commited (#1990603) to dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.