diff options
author | Greg Humphreys <humper@google.com> | 2014-10-16 14:23:02 -0400 |
---|---|---|
committer | Greg Humphreys <humper@google.com> | 2014-10-16 14:23:02 -0400 |
commit | c9df8ce8212448a9d33b57d266a0aef5c28a98e9 (patch) | |
tree | a2565a719d6852064d9e8bb1cf9aef9b8b477f78 /experimental | |
parent | 5bb9700b7ef952f2664e059afb4f9f137f7d5a7d (diff) |
fix display of fiddles that DON'T have compile errors
BUG=skia:
Review URL: https://codereview.chromium.org/644253003
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/webtry/res/js/webtry.js | 2 | ||||
-rw-r--r-- | experimental/webtry/webtry.go | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/experimental/webtry/res/js/webtry.js b/experimental/webtry/res/js/webtry.js index 8bce06bfd7..18190e92cb 100644 --- a/experimental/webtry/res/js/webtry.js +++ b/experimental/webtry/res/js/webtry.js @@ -269,7 +269,7 @@ // image to display. endWait(); body = JSON.parse(e.target.response); - if (body.compileErrors.length) { + if (null != body.compileErrors && body.compileErrors.length) { html = ""; for (i = 0 ; i < body.compileErrors.length ; i++) { compileError = body.compileErrors[i]; diff --git a/experimental/webtry/webtry.go b/experimental/webtry/webtry.go index 34aa47e282..2096f7d778 100644 --- a/experimental/webtry/webtry.go +++ b/experimental/webtry/webtry.go @@ -937,9 +937,8 @@ func mainHandler(w http.ResponseWriter, r *http.Request) { } m := response{ - Message: message, - Img: base64.StdEncoding.EncodeToString([]byte(png)), - Hash: hash, + Img: base64.StdEncoding.EncodeToString([]byte(png)), + Hash: hash, } resp, err := json.Marshal(m) if err != nil { |