Skip to content

Commit

Permalink
Fix JSON tester bug
Browse files Browse the repository at this point in the history
  • Loading branch information
iradul committed Dec 29, 2018
1 parent 1c24602 commit 4aa3454
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 44 deletions.
2 changes: 1 addition & 1 deletion k2ws/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"os/signal"
)

const productVersion = "1.1"
const productVersion = "1.1.1"

func main() {
configFile := flag.String("config", "config.yaml", "Config file location")
Expand Down
83 changes: 41 additions & 42 deletions k2ws/static.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion k2ws/static/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
function $$isJSON(msg) {
if (msg.length === 0 || msg[0] !== '{' && msg[0] !== '[') return false;
try {
JSON.parse(str);
JSON.parse(msg);
} catch (e) {
return false;
}
Expand Down

0 comments on commit 4aa3454

Please sign in to comment.