File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 25
25
* Fixed ` #[should_panic] ` not working with ` #[wasm_bindgen_test(unsupported = ...)] ` .
26
26
[ #4196 ] ( https://github.com/rustwasm/wasm-bindgen/pull/4196 )
27
27
28
+ * Fixed potential ` null ` error when using ` JsValue::as_debug_string() ` .
29
+ [ #4192 ] ( https://github.com/rustwasm/wasm-bindgen/pull/4192 )
30
+
28
31
--------------------------------------------------------------------------------
29
32
30
33
## [ 0.2.95] ( https://github.com/rustwasm/wasm-bindgen/compare/0.2.94...0.2.95 )
Original file line number Diff line number Diff line change @@ -1958,7 +1958,6 @@ __wbg_set_wasm(wasm);"
1958
1958
if (!(instance instanceof klass)) {
1959
1959
throw new Error(`expected instance of ${klass.name}`);
1960
1960
}
1961
- return instance.ptr;
1962
1961
}
1963
1962
" ,
1964
1963
) ;
@@ -3986,7 +3985,7 @@ __wbg_set_wasm(wasm);"
3986
3985
// Test for built-in
3987
3986
const builtInMatches = /\\ [object ([^\\ ]]+)\\ ]/.exec(toString.call(val));
3988
3987
let className;
3989
- if (builtInMatches.length > 1) {
3988
+ if (builtInMatches && builtInMatches .length > 1) {
3990
3989
className = builtInMatches[1];
3991
3990
} else {
3992
3991
// Failed to match the standard '[object ClassName]'
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ function debugString(val) {
90
90
// Test for built-in
91
91
const builtInMatches = / \[ o b j e c t ( [ ^ \] ] + ) \] / . exec ( toString . call ( val ) ) ;
92
92
let className ;
93
- if ( builtInMatches . length > 1 ) {
93
+ if ( builtInMatches && builtInMatches . length > 1 ) {
94
94
className = builtInMatches [ 1 ] ;
95
95
} else {
96
96
// Failed to match the standard '[object ClassName]'
You can’t perform that action at this time.
0 commit comments