Skip to content

Commit

Permalink
fix workaround, #764
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Apr 8, 2018
1 parent 42ece26 commit 157b225
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/nodes/RichText.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -336,7 +336,7 @@ define( function( require ) {
node.matrix = matrix;
linkRootNode.addChild( node );
}
})();
} )();
}

// Clear them out afterwards, for memory purposes
Expand Down Expand Up @@ -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( /&lt;/g, '<' )
.replace( /&amp;/g, '&' )
.replace( /&#x2F;/g, '/' )
.replace( /&#x27;/g, '\'' )
.replace( /&gt;/g, '>' )
.replace( /&lt;/g, '<' )
.replace( /&amp;/g, '&' )
} );
}
if ( element.attributes.size ) {
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 157b225

Please sign in to comment.