Skip to content

Commit

Permalink
Merge pull request #7 from ajluisarg/fix/redis-parser-pikadb
Browse files Browse the repository at this point in the history
fix: redis parser when value is undefined
  • Loading branch information
p3x-robot authored Apr 3, 2024
2 parents 86ffc61 + 7e6d9d1 commit adcd1de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/angular/factory/p3xr-redis-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ p3xr.ng.factory('p3xrRedisParser', function ($rootScope) {
currentSectionObj = {}
} else if (line.length > 2) {
const lineArray = line.split(':')
currentSectionObj[lineArray[0]] = lineArray[1].includes(',') ? selfMain.array({
line: lineArray[1].trim()
}) : lineArray[1].trim()
const value = lineArray[1] ?? "";
currentSectionObj[lineArray[0]] = value.includes(',') ? selfMain.array({
line: value.trim()
}) : value.trim()
}
}
if (section !== undefined) {
Expand Down

0 comments on commit adcd1de

Please sign in to comment.