Fix a bug causing Sequences to not be playable

This commit is contained in:
Aria Minaei 2022-12-01 14:53:09 +01:00
parent 3552f50613
commit 53ab4dbf9d

View file

@ -44,7 +44,7 @@ export default class Sequence {
_playableRangeD: undefined | Prism<{start: number; end: number}> _playableRangeD: undefined | Prism<{start: number; end: number}>
readonly pointer: ISequence['pointer'] = pointer({root: this, path: []}) readonly pointer: ISequence['pointer'] = pointer({root: this, path: []})
readonly $$isIdentityDerivationProvider = true readonly $$isIdentityPrismProvider = true
readonly _logger: ILogger readonly _logger: ILogger
constructor( constructor(
@ -81,7 +81,7 @@ export default class Sequence {
}) })
} }
getIdentityDerivation(path: Array<string | number>): Prism<unknown> { getIdentityPrism(path: Array<string | number>): Prism<unknown> {
if (path.length === 0) { if (path.length === 0) {
return prism((): ISequence['pointer']['$$__pointer_type'] => ({ return prism((): ISequence['pointer']['$$__pointer_type'] => ({
length: val(this.pointer.length), length: val(this.pointer.length),