Fix typescript type error in admin-e2e-tests package (https://github.com/woocommerce/woocommerce-admin/pull/7765)

* Fix type error

* Update changelog

* Better type handlings
This commit is contained in:
Ilyas Foo 2021-10-23 11:03:24 +08:00 committed by GitHub
parent c12a451af0
commit 29367e5f14
2 changed files with 7 additions and 3 deletions

View File

@ -3,6 +3,8 @@
- Make unchecking free features more robust. #7761
- Fix typescript type error in admin-e2e-tests package #7765
# 0.1.2
- Add Customers to analytics pages tested #7573

View File

@ -142,9 +142,11 @@ export abstract class BasePage {
timeout: 10000,
} );
} catch ( e ) {
throw new Error(
`Could not navigate to url: ${ fullUrl } with error: ${ e.message }`
);
if ( e instanceof Error ) {
throw new Error(
`Could not navigate to url: ${ fullUrl } with error: ${ e.message }`
);
}
}
}
}