comparison src/app/Session.ts @ 509:041468f553e1 tip master

Merge pull request #57 from LucasThompson/fix/session-stack-max-call-stack Fix accidental recursion in PersistentStack
author Lucas Thompson <LucasThompson@users.noreply.github.com>
date Mon, 27 Nov 2017 11:04:30 +0000
parents 7ac80ad913c1
children
comparison
equal deleted inserted replaced
507:0e6d4f994b73 509:041468f553e1
88 this.stack = [item, ...this.stack]; 88 this.stack = [item, ...this.stack];
89 return this.stack.length; 89 return this.stack.length;
90 } 90 }
91 91
92 unshift(item: T): number { 92 unshift(item: T): number {
93 const newLength = this.unshift(item); 93 const newLength = this.unshiftMutating(item);
94 this.updateHistory(); 94 this.updateHistory();
95 return newLength; 95 return newLength;
96 } 96 }
97 97
98 findIndex(predicate: (value: T, 98 findIndex(predicate: (value: T,