From 62ec2c19bc26c1293c5267ae663a3548a4467280 Mon Sep 17 00:00:00 2001 From: samreid Date: Tue, 22 Aug 2017 23:21:44 -0600 Subject: [PATCH] Fixed a bug in isFinite check, see https://github.com/phetsims/circuit-construction-kit-common/issues/317 --- js/model/Charge.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/model/Charge.js b/js/model/Charge.js index 02c78636..6e3c09aa 100644 --- a/js/model/Charge.js +++ b/js/model/Charge.js @@ -112,7 +112,7 @@ define( function( require ) { * @public */ setLocation: function( circuitElement, distance ) { - assert && assert( !isFinite( distance ), 'Distance was not finite' ); // also guards against NaN + assert && assert( isFinite( distance ), 'Distance was not finite' ); // also guards against NaN assert && assert( circuitElement.containsScalarLocation( distance ), 'no location in branch' ); this.circuitElement = circuitElement; this.distanceProperty.set( distance );