mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Check if getCleanAppState is defined before calling (#9170)
This commit is contained in:
parent
cb503d9403
commit
4922b1b9b5
@ -180,7 +180,9 @@ class Driver {
|
||||
await fs.writeFile(`${filepathBase}-screenshot.png`, screenshot, { encoding: 'base64' })
|
||||
const htmlSource = await this.driver.getPageSource()
|
||||
await fs.writeFile(`${filepathBase}-dom.html`, htmlSource)
|
||||
const uiState = await this.driver.executeScript(() => window.getCleanAppState())
|
||||
const uiState = await this.driver.executeScript(
|
||||
() => window.getCleanAppState && window.getCleanAppState(),
|
||||
)
|
||||
await fs.writeFile(`${filepathBase}-state.json`, JSON.stringify(uiState, null, 2))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user