mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-23 15:50:10 -06:00
Fix taking screenshots in Electron with debug logs enabled (#6684)
This commit is contained in:
@@ -231,12 +231,14 @@ module.exports = {
|
||||
|
||||
return originalSendCommand.call(webContents.debugger, message, data)
|
||||
.then((res) => {
|
||||
if (debug.enabled && (_.get(res, 'data.length') > 100)) {
|
||||
res = _.clone(res)
|
||||
res.data = `${res.data.slice(0, 100)} [truncated]`
|
||||
let debugRes = res
|
||||
|
||||
if (debug.enabled && (_.get(debugRes, 'data.length') > 100)) {
|
||||
debugRes = _.clone(debugRes)
|
||||
debugRes.data = `${debugRes.data.slice(0, 100)} [truncated]`
|
||||
}
|
||||
|
||||
debug('debugger: received response to %s: %o', message, res)
|
||||
debug('debugger: received response to %s: %o', message, debugRes)
|
||||
|
||||
return res
|
||||
}).catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user