aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax/ajax.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ajax/ajax.js')
-rw-r--r--src/ajax/ajax.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js
index 795cd8a9e..ccf4f14a9 100644
--- a/src/ajax/ajax.js
+++ b/src/ajax/ajax.js
@@ -49,8 +49,10 @@ jQuery.fn.extend({
return this.bind("load", url);
var off = url.indexOf(" ");
- var selector = url.slice(off, url.length);
- url = url.slice(0, off);
+ if ( off >= 0 ) {
+ var selector = url.slice(off, url.length);
+ url = url.slice(0, off);
+ }
callback = callback || function(){};