Skip to content

Commit

Permalink
Don't require that there are listeners, to support unit tests, see ph…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jan 26, 2021
1 parent 35f2dad commit 79d751a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion js/asyncLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class AsyncLoader {
proceedIfReady() {
if ( this.pendingLocks.length === 0 ) {
assert && assert( !this.loadComplete, 'cannot complete load twice' );
assert && assert( this.listeners.length > 0, 'async requires at least one listener' );
this.loadComplete = true;

this.listeners.forEach( listener => listener() );
Expand Down

0 comments on commit 79d751a

Please sign in to comment.