Skip to content

Commit

Permalink
Working on typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Nov 11, 2024
1 parent 8e3c5c0 commit 280cd4e
Show file tree
Hide file tree
Showing 5 changed files with 386 additions and 315 deletions.
5 changes: 2 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,11 @@ function checkIsGlobal(obj) {
return obj && obj.common && (regExGlobalOld.test(obj.common.name) || regExGlobalNew.test(obj._id));
}

function convertBackStringifiedValues(id, state) {
function convertBackStringifiedValues(id: string, state: ioBroker.State | null | undefined): ioBroker.State | null | undefined {
if (
state &&
typeof state.val === 'string' &&
context.objects[id] &&
context.objects[id].common &&
context.objects[id]?.common &&
(context.objects[id].common.type === 'array' || context.objects[id].common.type === 'object')
) {
try {
Expand Down
Loading

0 comments on commit 280cd4e

Please sign in to comment.