mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
in th emiddle of transitioning to box flex
This commit is contained in:
parent
f0e45deb1e
commit
fb2a1325c6
7 changed files with 108 additions and 555 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
// backbone or something uses _.uniqueId, so we make our own here
|
||||
var uniqueId = (function() {
|
||||
var n = 0;
|
||||
|
@ -799,7 +798,8 @@ var Branch = Ref.extend({
|
|||
var Commit = Backbone.Model.extend({
|
||||
defaults: {
|
||||
type: 'commit',
|
||||
children: []
|
||||
children: [],
|
||||
parents: []
|
||||
},
|
||||
|
||||
validateAtInit: function() {
|
||||
|
@ -808,9 +808,7 @@ var Commit = Backbone.Model.extend({
|
|||
}
|
||||
|
||||
// root commits have no parents
|
||||
if (this.get('rootCommit')) {
|
||||
this.set('parents', []);
|
||||
} else {
|
||||
if (!this.get('rootCommit')) {
|
||||
if (!this.get('parents') || !this.get('parents').length) {
|
||||
throw new Error('needs parents');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue