Picking from the wrong end of the workspace history list.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 21 Apr 2014 14:57:50 +0000 (14:57 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 21 Apr 2014 14:57:50 +0000 (14:57 +0000)
BUG=skia:
R=mtklein@google.com

Author: jcgregorio@google.com

Review URL: https://codereview.chromium.org/244133002

git-svn-id: http://skia.googlecode.com/svn/trunk@14275 2bbb7eff-a529-9590-31e7-b0007b416f81

experimental/webtry/webtry.go

index 4c0e5b0..73b1ae5 100644 (file)
@@ -437,7 +437,7 @@ func workspaceHandler(w http.ResponseWriter, r *http.Request) {
                if len(tries) == 0 {
                        code = DEFAULT_SAMPLE
                } else {
-                       code = getCode(tries[len(tries)-1].Hash)
+                       code = getCode(tries[0].Hash)
                }
                if err := workspaceTemplate.Execute(w, Workspace{Tries: tries, Code: code, Name: name}); err != nil {
                        log.Printf("ERROR: Failed to expand template: %q\n", err)