Skip to content

Commit

Permalink
chore: update dfbus output cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
luisbocanegra committed Jan 19, 2025
1 parent 4eb7578 commit 4c347f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions package/contents/ui/DBusServiceModel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ Item {
if (exitCode!==0) return
stdout = stdout
.trim()
.replace(/^\(\s*'/, '') // starting "('"
.replace(/',?\s*\)$/, '') // ending "',)" or ")"
.trim();
// console.log("stdout parsed:", stdout)
.replace(/^\([']?/, "") // starting ( or ('
.replace(/[']?,\)$/, "") // ending ,) or ',)
// console.log(`stdout parsed: '${stdout}'`)
if(cmd === pendingSwitchCmd) {
switchIsPending = stdout === "true"
}
Expand Down
2 changes: 0 additions & 2 deletions package/contents/ui/code/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,6 @@ function editProperty(object, path, value) {
// no new keys unless it's an array
if (!current.hasOwnProperty(lastKey) && !Array.isArray(current)) return

console.log(lastKey)

if (Array.isArray(current)) {
const index = parseInt(lastKey, 10)
// add to array if it's the next index
Expand Down

0 comments on commit 4c347f5

Please sign in to comment.