File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/BootstrapBlazor/Components/Upload Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -133,20 +133,19 @@ protected async Task OnFileChange(InputFileChangeEventArgs args)
133133 await OnAllFileUploaded ( items ) ;
134134 }
135135
136- var type = NullableUnderlyingType ?? typeof ( TValue ) ;
137- if ( type . IsAssignableTo ( typeof ( IEnumerable < IBrowserFile > ) ) )
136+ if ( ValueType . IsAssignableTo ( typeof ( IEnumerable < IBrowserFile > ) ) )
138137 {
139138 CurrentValue = ( TValue ) ( object ) items . Select ( f => f . File ) . ToList ( ) ;
140139 }
141- else if ( type . IsAssignableTo ( typeof ( IEnumerable < string > ) ) )
140+ else if ( ValueType . IsAssignableTo ( typeof ( IEnumerable < string > ) ) )
142141 {
143142 CurrentValue = ( TValue ) ( object ) string . Join ( ";" , items . Select ( f => f . OriginFileName ) ) . ToList ( ) ;
144143 }
145- else if ( type == typeof ( IBrowserFile ) )
144+ else if ( ValueType == typeof ( IBrowserFile ) )
146145 {
147146 CurrentValue = ( TValue ) ( object ) items [ 0 ] . File ! ;
148147 }
149- else if ( type == typeof ( string ) )
148+ else if ( ValueType == typeof ( string ) )
150149 {
151150 CurrentValue = ( TValue ) ( object ) string . Join ( ";" , items . Select ( f => f . OriginFileName ) ) ;
152151 }
You can’t perform that action at this time.
0 commit comments