Skip to content

Commit

Permalink
lengthProperty should also respect hasListenerOrderDependencies, phet…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Aug 25, 2023
1 parent e87e8b6 commit 4f571cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/TinyEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default class TinyEmitter<T extends TEmitterParameter[] = []> implements
this.hasListenerOrderDependencies = hasListenerOrderDependencies;
}

// Listener order is preserved in Set
this.listeners = new Set();

this.emitContexts = [];
Expand Down
3 changes: 2 additions & 1 deletion js/createObservableArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ const createObservableArray = <T>( providedOptions?: ObservableArrayOptions<T> )
const lengthProperty = new NumberProperty( 0, combineOptions<NumberPropertyOptions>( {
numberType: 'Integer',
tandem: options.tandem?.createTandem( 'lengthProperty' ),
phetioReadOnly: true
phetioReadOnly: true,
hasListenerOrderDependencies: options.hasListenerOrderDependencies
}, options.lengthPropertyOptions ) );

// The underlying array which is wrapped by the Proxy
Expand Down

0 comments on commit 4f571cb

Please sign in to comment.