From f570ceb5d944c5678b0dac7f4a8cae72b4b4df9c Mon Sep 17 00:00:00 2001 From: Dan Makovec Date: Fri, 13 Nov 2015 15:54:04 +1100 Subject: [PATCH] Applied https://github.com/derickbailey/backbone.memento/pull/21 --- backbone.memento.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/backbone.memento.js b/backbone.memento.js index 2be289f..5665bc7 100644 --- a/backbone.memento.js +++ b/backbone.memento.js @@ -6,6 +6,21 @@ // Documentation and Full License Available at: // http://github.com/derickbailey/backbone.memento +(function(root, factory) { + // Set up Backbone-relational for the environment. Start with AMD. + if (typeof define === 'function' && define.amd) { + define(['exports', 'backbone', 'underscore'], factory); + } + // Next for Node.js or CommonJS. + else if (typeof exports !== 'undefined') { + factory(exports, require('backbone'), require('underscore')); + } + // Finally, as a browser global. Use `root` here as it references `window`. + else { + factory(root, root.Backbone, root._); + } +}(this, function(exports, Backbone, _) { + Backbone.Memento = (function(Backbone, _){ 'use strict'; @@ -157,3 +172,4 @@ Backbone.Memento = (function(Backbone, _){ return Memento; })(Backbone, _); +}));