mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-24 21:09:47 +00:00
Remove some type casts
Change-type: patch
This commit is contained in:
parent
c66e1aab9d
commit
235f9f04af
@ -494,7 +494,5 @@ export function normalizeLabels(labels: {
|
|||||||
labels,
|
labels,
|
||||||
(_v, k) => !(_.startsWith(k, 'io.balena.') || _.startsWith(k, 'io.resin.')),
|
(_v, k) => !(_.startsWith(k, 'io.balena.') || _.startsWith(k, 'io.resin.')),
|
||||||
);
|
);
|
||||||
return _.assign({}, otherLabels, legacyLabels, balenaLabels) as {
|
return _.assign({}, otherLabels, legacyLabels, balenaLabels);
|
||||||
[key: string]: string;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,13 @@ export class RPiConfigBackend extends DeviceConfigBackend {
|
|||||||
if (conf[key] == null) {
|
if (conf[key] == null) {
|
||||||
conf[key] = [];
|
conf[key] = [];
|
||||||
}
|
}
|
||||||
(conf[key] as string[]).push(value);
|
const confArr = conf[key];
|
||||||
|
if (!_.isArray(confArr)) {
|
||||||
|
throw new Error(
|
||||||
|
`Expected '${key}' to have a config array but got ${typeof confArr}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
confArr.push(value);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user