From 157b2258ea15736c257c6862c8f6341a29ec4234 Mon Sep 17 00:00:00 2001 From: zepumph Date: Sun, 8 Apr 2018 11:20:02 -0800 Subject: [PATCH] fix workaround, https://github.com/phetsims/scenery/issues/764 --- js/nodes/RichText.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/js/nodes/RichText.js b/js/nodes/RichText.js index 7c0c8d83a..b817c7d12 100644 --- a/js/nodes/RichText.js +++ b/js/nodes/RichText.js @@ -309,7 +309,7 @@ define( function( require ) { // ancestor that has listeners and a11y) while ( this._linkItems.length ) { // Close over the href and other references - (function(){ + ( function() { var linkElement = self._linkItems[ 0 ].element; var href = self._linkItems[ 0 ].href; var i; @@ -336,7 +336,7 @@ define( function( require ) { node.matrix = matrix; linkRootNode.addChild( node ); } - })(); + } )(); } // Clear them out afterwards, for memory purposes @@ -568,11 +568,11 @@ define( function( require ) { font = font.copy( { // Handle decoding family: element.attributes.face.replace( /"/g, '"' ) - .replace( ///g, '/' ) - .replace( /'/g, '\'' ) - .replace( />/g, '>' ) - .replace( /</g, '<' ) - .replace( /&/g, '&' ) + .replace( ///g, '/' ) + .replace( /'/g, '\'' ) + .replace( />/g, '>' ) + .replace( /</g, '<' ) + .replace( /&/g, '&' ) } ); } if ( element.attributes.size ) { @@ -1711,7 +1711,7 @@ define( function( require ) { var tmp = this.addAccessibleInputListener( this.accessibleInputListener ); // "safe?" workaround for https://github.com/phetsims/scenery/issues/764 - if ( this.getAccessibleInputListeners().contains( tmp ) ) { + if ( this.getAccessibleInputListeners() && this.getAccessibleInputListeners().contains( tmp ) ) { this.accessibleInputListener = tmp; } }