|
1 |
| -// Backbone.js 1.1.1 |
| 1 | +// Backbone.js 1.1.2 |
2 | 2 |
|
3 | 3 | // (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
4 | 4 | // Backbone may be freely distributed under the MIT license.
|
|
17 | 17 |
|
18 | 18 | // Next for Node.js or CommonJS. jQuery may not be needed as a module.
|
19 | 19 | } else if (typeof exports !== 'undefined') {
|
20 |
| - var _ = require('underscore'), $; |
21 |
| - try { $ = require('jquery'); } catch(e) {} |
22 |
| - factory(root, exports, _, $); |
| 20 | + var _ = require('underscore'); |
| 21 | + factory(root, exports, _); |
23 | 22 |
|
24 | 23 | // Finally, as a browser global.
|
25 | 24 | } else {
|
|
42 | 41 | var splice = array.splice;
|
43 | 42 |
|
44 | 43 | // Current version of the library. Keep in sync with `package.json`.
|
45 |
| - Backbone.VERSION = '1.1.1'; |
| 44 | + Backbone.VERSION = '1.1.2'; |
46 | 45 |
|
47 | 46 | // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
|
48 | 47 | // the `$` variable.
|
|
1293 | 1292 | return optional ? match : '([^/?]+)';
|
1294 | 1293 | })
|
1295 | 1294 | .replace(splatParam, '([^?]*?)');
|
1296 |
| - return new RegExp('^' + route + '(?:\\?(.*))?$'); |
| 1295 | + return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$'); |
1297 | 1296 | },
|
1298 | 1297 |
|
1299 | 1298 | // Given a route, and a URL fragment that it matches, return the array of
|
|
1450 | 1449 | // but possibly useful for unit testing Routers.
|
1451 | 1450 | stop: function() {
|
1452 | 1451 | Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
|
1453 |
| - clearInterval(this._checkUrlInterval); |
| 1452 | + if (this._checkUrlInterval) clearInterval(this._checkUrlInterval); |
1454 | 1453 | History.started = false;
|
1455 | 1454 | },
|
1456 | 1455 |
|
|
0 commit comments