mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-03 11:14:27 +02:00
change '_.clone(..args)' to 'Object.assign({}, ..args)'
This commit is contained in:
parent
052aa1e299
commit
489a4b9095
8 changed files with 14 additions and 17 deletions
|
@ -86,7 +86,7 @@ var GeneralButton = ContainedBase.extend({
|
|||
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
this.navEvents = options.navEvents || _.clone(Backbone.Events);
|
||||
this.navEvents = options.navEvents || Object.assign({}, Backbone.Events);
|
||||
this.destination = options.destination;
|
||||
if (!this.destination) {
|
||||
this.container = new ModalTerminal();
|
||||
|
@ -160,7 +160,7 @@ var LeftRightView = PositiveNegativeBase.extend({
|
|||
// events system to add support for git demonstration view taking control of the
|
||||
// click events
|
||||
this.pipeEvents = options.events;
|
||||
this.navEvents = _.clone(Backbone.Events);
|
||||
this.navEvents = Object.assign({}, Backbone.Events);
|
||||
|
||||
this.JSON = {
|
||||
showLeft: (options.showLeft === undefined) ? true : options.showLeft,
|
||||
|
@ -305,7 +305,7 @@ var ModalTerminal = ContainedBase.extend({
|
|||
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
this.navEvents = options.events || _.clone(Backbone.Events);
|
||||
this.navEvents = options.events || Object.assign({}, Backbone.Events);
|
||||
|
||||
this.container = new ModalView();
|
||||
this.JSON = {
|
||||
|
@ -395,7 +395,7 @@ var ConfirmCancelTerminal = Backbone.View.extend({
|
|||
}.bind(this));
|
||||
|
||||
// also setup keyboard
|
||||
this.navEvents = _.clone(Backbone.Events);
|
||||
this.navEvents = Object.assign({}, Backbone.Events);
|
||||
this.navEvents.on('positive', this.positive, this);
|
||||
this.navEvents.on('negative', this.negative, this);
|
||||
this.keyboardListener = new KeyboardListener({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue