Skip to content

Commit

Permalink
Update Export GFF3 to fix browsers with Array.prototype.values enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jan 29, 2019
1 parent ecf0f7f commit 89c5196
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/JBrowse/View/Export/GFF3.js
Expand Up @@ -197,17 +197,19 @@ return declare( ExportBase,
if(!val) {
continue;
}

var valstring = val.hasOwnProperty( 'toString' )
? gff.util.escape( val.toString() ) :
val.values
? function(val) {
return val instanceof Array
? array.map( val, lang.hitch(this,'_gff3_escape') ).join(',')
: gff.util.escape( val );
}.call(this,val.values) :

val instanceof Array
? array.map( val, lang.hitch(this,'_gff3_escape') ).join(',')
: gff.util.escape( val );
? array.map( val, s => gff.util.escape( s ) ).join(',')
:

val.values
? val instanceof Array
? array.map( val, s => gff.util.escape( s ) ).join(',')
: gff.util.escape( val )
: gff.util.escape(val)
attrOrder.push( gff.util.escape( tag )+'='+valstring);
}
return attrOrder.join(';') || '.';
Expand Down

0 comments on commit 89c5196

Please sign in to comment.