Skip to content

Commit

Permalink
Handle skill parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
ssdh233 committed Aug 20, 2018
1 parent 926e604 commit d64f3ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions controllers/list_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ module.exports.controller = function (app) {
} else {
var data = [];
for (var i in result.rows) {
var guitar_skill = JSON.parse(result.rows[i].guitar_skill);
var drum_skill = JSON.parse(result.rows[i].drum_skill);
try {
var guitar_skill = JSON.parse(result.rows[i].guitar_skill);
var drum_skill = JSON.parse(result.rows[i].drum_skill);
data.push({
id : result.rows[i].id,
player_name : result.rows[i].player_name,
Expand Down
4 changes: 2 additions & 2 deletions controllers/userlist_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ module.exports.controller = function (app) {
} else {
var data = [];
for (var i in result.rows) {
var guitar_skill = JSON.parse(result.rows[i].guitar_skill);
var drum_skill = JSON.parse(result.rows[i].drum_skill);
try {
var guitar_skill = JSON.parse(result.rows[i].guitar_skill);
var drum_skill = JSON.parse(result.rows[i].drum_skill);
data.push({
id : result.rows[i].id,
player_name : result.rows[i].player_name,
Expand Down

0 comments on commit d64f3ee

Please sign in to comment.