We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 486813e commit 98a24a7Copy full SHA for 98a24a7
src/JSInterop/Microsoft.JSInterop.JS/src/src/Microsoft.JSInterop.ts
@@ -155,7 +155,7 @@ export module DotNet {
155
* @throws Error if the given value is not an Object.
156
*/
157
export function createJSObjectReference(jsObject: any): any {
158
- if (jsObject && typeof jsObject === "object") {
+ if (jsObject && (typeof jsObject === "object" || jsObject instanceof Function)) {
159
cachedJSObjectsById[nextJsObjectId] = new JSObject(jsObject);
160
161
const result = {
0 commit comments