File tree Expand file tree Collapse file tree 1 file changed +2
-26
lines changed
packages/svelte/src/compiler/phases Expand file tree Collapse file tree 1 file changed +2
-26
lines changed Original file line number Diff line number Diff line change @@ -407,20 +407,8 @@ class Evaluation {
407407 const arg = scope . evaluate ( /** @type {Expression } */ ( expression . arguments [ 0 ] ) ) ;
408408 if ( arg . is_known ) {
409409 this . values . add ( Number ( arg . value ) ) ;
410- } else if ( arg . is_number ) {
411- this . values . add ( NUMBER ) ;
412410 } else {
413- for ( let value of arg . values ) {
414- switch ( value ) {
415- case STRING :
416- case NUMBER :
417- case UNKNOWN :
418- this . values . add ( NUMBER ) ;
419- break ;
420- default :
421- this . values . add ( Number ( value ) ) ;
422- }
423- }
411+ this . values . add ( NUMBER ) ;
424412 }
425413 } else {
426414 this . values . add ( 0 ) ;
@@ -432,20 +420,8 @@ class Evaluation {
432420 const arg = scope . evaluate ( /** @type {Expression } */ ( expression . arguments [ 0 ] ) ) ;
433421 if ( arg . is_known ) {
434422 this . values . add ( String ( arg . value ) ) ;
435- } else if ( arg . is_number || arg . is_string ) {
436- this . values . add ( STRING ) ;
437423 } else {
438- for ( let value of arg . values ) {
439- switch ( value ) {
440- case STRING :
441- case NUMBER :
442- case UNKNOWN :
443- this . values . add ( STRING ) ;
444- break ;
445- default :
446- this . values . add ( String ( value ) ) ;
447- }
448- }
424+ this . values . add ( STRING ) ;
449425 }
450426 } else {
451427 this . values . add ( '' ) ;
You can’t perform that action at this time.
0 commit comments