[wasm][debugger] Fix incompatibility between runtime and nuget package (#66295)
authorThays Grazia <thaystg@gmail.com>
Thu, 17 Mar 2022 18:54:53 +0000 (15:54 -0300)
committerGitHub <noreply@github.com>
Thu, 17 Mar 2022 18:54:53 +0000 (13:54 -0500)
* Fix incompatibility between runtime and nuget package

* Update debug.ts

src/mono/wasm/runtime/debug.ts

index 1684ff3..a611517 100644 (file)
@@ -149,6 +149,10 @@ export function mono_wasm_get_loaded_files(): string[] {
 function _create_proxy_from_object_id(objectId: string, details: any) {
     if (objectId.startsWith("dotnet:array:")) {
         let ret: Array<any>;
+        if (details.items === undefined) {
+            ret = details.map ((p: any) => p.value);
+            return ret;
+        }
         if (details.dimensionsDetails === undefined || details.dimensionsDetails.length === 1) {
             ret = details.items.map((p: any) => p.value);
             return ret;