Navigation Menu

Skip to content

Commit

Permalink
simpler check against non-empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
dermetfan committed Dec 2, 2021
1 parent 30777f8 commit 531f92b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/component/web/main.go
Expand Up @@ -128,7 +128,7 @@ func (self *Web) WorkflowNewGet(w http.ResponseWriter, req *http.Request) {
}

// step 4
if len(inputsJson) > 0 {
if inputsJson != "" {
facts, err := self.parseFacts([]byte(inputsJson))
if err != nil {
self.ClientError(w, err)
Expand All @@ -145,7 +145,7 @@ func (self *Web) WorkflowNewGet(w http.ResponseWriter, req *http.Request) {
}

// step 3
if len(name) > 0 {
if name != "" {
render(templateName, w, map[string]interface{}{"Source": source, "Name": name})
return
}
Expand Down

0 comments on commit 531f92b

Please sign in to comment.