Fix unboxing datetime instances (#54105)
authorKatelyn Gadd <kg@luminance.org>
Tue, 15 Jun 2021 19:29:51 +0000 (12:29 -0700)
committerGitHub <noreply@github.com>
Tue, 15 Jun 2021 19:29:51 +0000 (12:29 -0700)
Unboxing datetime instances is currently broken in some cases due to an incorrect method signature

src/mono/wasm/runtime/binding_support.js

index 3951da5..6661228 100644 (file)
@@ -441,7 +441,7 @@ var BindingSupportLib = {
                                case 18:
                                        throw new Error ("Marshalling of primitive arrays are not supported.  Use the corresponding TypedArray instead.");
                                case 20: // clr .NET DateTime
-                                       var dateValue = this.call_method(this.get_date_value, null, "md", [ mono_obj ]);
+                                       var dateValue = this.call_method(this.get_date_value, null, "m", [ mono_obj ]);
                                        return new Date(dateValue);
                                case 21: // clr .NET DateTimeOffset
                                        var dateoffsetValue = this._object_to_string (mono_obj);