godoc/static: fix handling of playground snippets with no output

Fixes golang/go#11903

Change-Id: Ia7f85d83f1f697fd787a87cd74971f6cf0540792
Reviewed-on: https://go-review.googlesource.com/12751
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Andrew Gerrand 2015-07-28 14:42:13 +10:00
parent 7fe0389f47
commit 0f0e72bcc3
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ function HTTPTransport() {
var timeout; var timeout;
output({Kind: 'start'}); output({Kind: 'start'});
function next() { function next() {
if (events.length === 0) { if (!events || events.length === 0) {
output({Kind: 'end'}); output({Kind: 'end'});
return; return;
} }

File diff suppressed because one or more lines are too long