From 8706cd9e30199dfda3c2f28d568025ad4ab7260c Mon Sep 17 00:00:00 2001 From: Chris Malley Date: Thu, 30 May 2019 13:20:05 -0600 Subject: [PATCH] don't assign onPlateProperty if it has been disposed, https://github.com/phetsims/axon/issues/242 --- js/common/model/TermCreator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/common/model/TermCreator.js b/js/common/model/TermCreator.js index 1e7d8226..b07eeb2f 100644 --- a/js/common/model/TermCreator.js +++ b/js/common/model/TermCreator.js @@ -400,7 +400,9 @@ define( function( require ) { // ORDER IS VERY IMPORTANT HERE! var cell = this.plate.removeTerm( term ); this.termsOnPlate.remove( term ); - term.onPlateProperty.value = false; + if ( !term.onPlateProperty.isDisposed ) { + term.onPlateProperty.value = false; + } return cell; },