Skip to content

Commit

Permalink
Revert "referenceIO.toStateObject asserts instrumentation, #312"
Browse files Browse the repository at this point in the history
This reverts commit 4411368.
  • Loading branch information
samreid committed Jul 19, 2024
1 parent 4411368 commit 2fbf982
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions js/types/ReferenceIO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import IOType from './IOType.js';
import StringIO from './StringIO.js';
import { PhetioID } from '../TandemConstants.js';
import IOTypeCache from '../IOTypeCache.js';
import Tandem from '../Tandem.js';

// Cache each parameterized ReferenceIO so that it is only created once
const cache = new IOTypeCache();
Expand All @@ -42,7 +41,6 @@ const ReferenceIO = ( parameterType: IOType ): IOType => {
* directly to use this implementation.
*/
toStateObject( phetioObject ): ReferenceIOState {
assert && Tandem.VALIDATION && assert( phetioObject.isPhetioInstrumented(), 'Cannot reference an uninstrumented object', phetioObject );

// NOTE: We cannot assert that phetioObject.phetioState === false here because sometimes ReferenceIO is used statically like
// ReferenceIO( Vector2IO ).toStateObject( myVector );
Expand Down

0 comments on commit 2fbf982

Please sign in to comment.