As of the release of fluentui-blazor 4.13 or later, your JS library breaks.
The error occurs in this routine:
function reviveJSComponentArgs(key, value) { if (value && typeof value === "object" && value.hasOwnProperty(jsElementReferenceScopeKey)) { const collectionId = value[jsElementReferenceScopeKey]; const elements = document.querySelectorAll([data-ref|="${collectionId}"]`);
const result = {};
for (const element of elements) {
const attributeValue = element.getAttribute('data-ref');
const startIndex = attributeValue.indexOf('-') + 1;
const elementRefId = attributeValue.substring(startIndex);
result[elementRefId] = element;
}
return result;
}
return value;
}`
The first if statement falsely assumes that the "value" hasOwnProperty and throws:
value.hasOwnProperty is not a function TypeError: value.hasOwnProperty is not a function at reviveJSComponentArgs (BlazorJSComponents.bcdqxdgmpp.lib.module.js:113:57) at blazor.web.js:1:2806 at Array.reduce (<anonymous>) at Array.<anonymous> (blazor.web.js:1:2791) at JSON.parse (<anonymous>) at v (blazor.web.js:1:2773) at b.processJSCall (blazor.web.js:1:4409) at b.beginInvokeJSFromDotNet (blazor.web.js:1:4129) at Cn._invokeClientMethod (blazor.web.js:1:68829) at Cn._processIncomingData (http://localhost:5221/_framework/blazor.web.js:1:66188) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args) at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args) at Microsoft.FluentUI.AspNetCore.Components.FluentMenu.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
For more details and example repo to be able to reproduce this bug view this issue here:
microsoft/fluentui-blazor#4488
Please update us if you will be fixing this problem and when so at least we know what to do.
As of the release of fluentui-blazor 4.13 or later, your JS library breaks.
The error occurs in this routine:
function reviveJSComponentArgs(key, value) { if (value && typeof value === "object" && value.hasOwnProperty(jsElementReferenceScopeKey)) { const collectionId = value[jsElementReferenceScopeKey]; const elements = document.querySelectorAll([data-ref|="${collectionId}"]`);const result = {};
for (const element of elements) {
const attributeValue = element.getAttribute('data-ref');
const startIndex = attributeValue.indexOf('-') + 1;
const elementRefId = attributeValue.substring(startIndex);
result[elementRefId] = element;
}
The first if statement falsely assumes that the "value" hasOwnProperty and throws:
value.hasOwnProperty is not a function TypeError: value.hasOwnProperty is not a function at reviveJSComponentArgs (BlazorJSComponents.bcdqxdgmpp.lib.module.js:113:57) at blazor.web.js:1:2806 at Array.reduce (<anonymous>) at Array.<anonymous> (blazor.web.js:1:2791) at JSON.parse (<anonymous>) at v (blazor.web.js:1:2773) at b.processJSCall (blazor.web.js:1:4409) at b.beginInvokeJSFromDotNet (blazor.web.js:1:4129) at Cn._invokeClientMethod (blazor.web.js:1:68829) at Cn._processIncomingData (http://localhost:5221/_framework/blazor.web.js:1:66188) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args) at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args) at Microsoft.FluentUI.AspNetCore.Components.FluentMenu.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)For more details and example repo to be able to reproduce this bug view this issue here:
microsoft/fluentui-blazor#4488
Please update us if you will be fixing this problem and when so at least we know what to do.