File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/AzureMapsControl.Components/Map Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -260,26 +260,28 @@ public async ValueTask AddSourceAsync<TSource>(TSource source) where TSource : S
260260
261261 if ( source is DataSource dataSource )
262262 {
263+ dataSource . Logger = _logger ;
264+ dataSource . JSRuntime = _jsRuntime ;
265+
263266 await _jsRuntime . InvokeVoidAsync ( Constants . JsConstants . Methods . Core . AddSource . ToCoreNamespace ( ) ,
264267 source . Id ,
265268 source . GetSourceOptions ( ) ,
266269 source . SourceType . ToString ( ) ,
267270 dataSource . EventActivationFlags ? . EnabledEvents ,
268271 DotNetObjectReference . Create ( _dataSourceEventInvokeHelper ) ) ;
269- dataSource . Logger = _logger ;
270- dataSource . JSRuntime = _jsRuntime ;
271272 }
272273 else
273274 {
274- await _jsRuntime . InvokeVoidAsync ( Constants . JsConstants . Methods . Core . AddSource . ToCoreNamespace ( ) ,
275- source . Id ,
276- source . GetSourceOptions ( ) ,
277- source . SourceType . ToString ( ) ) ;
278275 if ( source is GriddedDataSource griddedDataSource )
279276 {
280277 griddedDataSource . Logger = _logger ;
281278 griddedDataSource . JSRuntime = _jsRuntime ;
282279 }
280+
281+ await _jsRuntime . InvokeVoidAsync ( Constants . JsConstants . Methods . Core . AddSource . ToCoreNamespace ( ) ,
282+ source . Id ,
283+ source . GetSourceOptions ( ) ,
284+ source . SourceType . ToString ( ) ) ;
283285 }
284286 }
285287
You can’t perform that action at this time.
0 commit comments