blazorators
blazorators copied to clipboard
Replaced `invokeMethod` with `invokeMethodAsync`
Using invokeMethod
throws the following error -
Uncaught Error: The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.
at y (blazor.server.js:1:1840)
at C.invokeMethod (blazor.server.js:1:3960)
at onSuccess (geolocation.js:19:15)
at geolocation.js:41:25
This issue can be overcome by using the async method.
@all-contributors please add @MahmudX for code
All the indentations were unintentional. Copy paste, I guess! 😛