mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-14 00:24:28 +02:00
omg finally works
This commit is contained in:
parent
aadeab8299
commit
f34c606d87
12 changed files with 496 additions and 251 deletions
|
@ -1,6 +1,12 @@
|
|||
var _;
|
||||
var Backbone;
|
||||
// horrible hack to get localStorage Backbone plugin
|
||||
if (!require('../util').isBrowser()) {
|
||||
var _ = require('underscore');
|
||||
var Backbone = require('backbone');
|
||||
_ = require('underscore');
|
||||
Backbone = require('backbone');
|
||||
} else {
|
||||
Backbone = window.Backbone;
|
||||
_ = window._;
|
||||
}
|
||||
|
||||
var MyError = Backbone.Model.extend({
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
exports.isBrowser = function() {
|
||||
return (typeof window === undefined);
|
||||
var inBrowser = String(typeof window) !== 'undefined';
|
||||
return inBrowser;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue