Skip to content

Commit 280cd4e

Browse files
committed
Working on typescript
1 parent 8e3c5c0 commit 280cd4e

File tree

5 files changed

+386
-315
lines changed

5 files changed

+386
-315
lines changed

main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,11 @@ function checkIsGlobal(obj) {
300300
return obj && obj.common && (regExGlobalOld.test(obj.common.name) || regExGlobalNew.test(obj._id));
301301
}
302302

303-
function convertBackStringifiedValues(id, state) {
303+
function convertBackStringifiedValues(id: string, state: ioBroker.State | null | undefined): ioBroker.State | null | undefined {
304304
if (
305305
state &&
306306
typeof state.val === 'string' &&
307-
context.objects[id] &&
308-
context.objects[id].common &&
307+
context.objects[id]?.common &&
309308
(context.objects[id].common.type === 'array' || context.objects[id].common.type === 'object')
310309
) {
311310
try {

0 commit comments

Comments
 (0)