Don't try to display unexistant screenshot (#1571)

Signed-off-by: Pascal Borreli <pascal@borreli.com>
This commit is contained in:
Pascal Borreli 2017-04-12 19:09:10 +01:00 committed by Peter Hedenskog
parent e5db4be248
commit bfad8af63c
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ block content
td #{d.webpagetest.pageSummary.data.median.firstView.requestsFull}
.one-half.column
if d.browsertime && d.browsertime.pageSummary && d.browsertime.pageSummary.screenshots
if d.browsertime && options.browsertime.screenshot && d.browsertime.pageSummary && d.browsertime.pageSummary.screenshots
- var width = options.mobile ? 150 : '100%';
a(href='data/screenshots/0.png')
img.screenshot(src='data/screenshots/0.png', width=width, alt='Screenshot of run 1')

View File

@ -90,7 +90,7 @@ block content
.one-half.column
//- No good way to detect if we have screenshots or not right now for a run
if d.browsertime
if d.browsertime && options.browsertime.screenshot
- screenshotName = 'data/screenshots/' + runIndex + '.png'
- var width = options.mobile ? 150 : '100%';
a(href=screenshotName)