From 036651050daf66f6c76c98725139f5597fb3a948 Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 3 Oct 2017 13:15:15 -0800 Subject: [PATCH] added TBAAGameChallenge to serialize challenge model state, https://github.com/phetsims/build-an-atom/issues/156 --- js/types/TArray.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/types/TArray.js b/js/types/TArray.js index 86123415..9856469a 100644 --- a/js/types/TArray.js +++ b/js/types/TArray.js @@ -55,6 +55,8 @@ define( function( require ) { * @returns {Array} */ toStateObject: function( array ) { + assert && assert( elementType.toStateObject, elementType.typeName + ' does not have a toStateObject method.'); + var json = []; for ( var i = 0; i < array.length; i++ ) { json.push( elementType.toStateObject( array[ i ] ) );