Fix .length on undefined WASM error (#6048)
This commit is contained in:
@ -258,14 +258,6 @@ export const isErrorWhitelisted = (exception: Error) => {
|
|||||||
foundInSpec: 'e2e/playwright/testing-settings.spec.ts',
|
foundInSpec: 'e2e/playwright/testing-settings.spec.ts',
|
||||||
},
|
},
|
||||||
// TODO: fix this error in the code
|
// TODO: fix this error in the code
|
||||||
{
|
|
||||||
name: 'TypeError',
|
|
||||||
message: "Cannot read properties of undefined (reading 'length')",
|
|
||||||
stack: '',
|
|
||||||
project: 'Google Chrome',
|
|
||||||
foundInSpec: '', // many tests are impacted by this error
|
|
||||||
},
|
|
||||||
// TODO: fix this error in the code
|
|
||||||
{
|
{
|
||||||
name: 'ReferenceError',
|
name: 'ReferenceError',
|
||||||
message: '_testUtils is not defined',
|
message: '_testUtils is not defined',
|
||||||
|
@ -121,6 +121,13 @@ impl EngineConnection {
|
|||||||
}
|
}
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
if value.is_null() || value.is_undefined() {
|
||||||
|
return Err(KclError::Engine(KclErrorDetails {
|
||||||
|
message: "Received null or undefined response from engine".into(),
|
||||||
|
source_ranges: vec![source_range],
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
// Convert JsValue to a Uint8Array
|
// Convert JsValue to a Uint8Array
|
||||||
let data = js_sys::Uint8Array::from(value);
|
let data = js_sys::Uint8Array::from(value);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user