Visual Console Client: minor changes
Former-commit-id: 85054f3f29f8a4102e2a0a06f456962eeb020ffc
This commit is contained in:
parent
86a7981331
commit
1f24747e53
|
@ -7,9 +7,9 @@ import {
|
|||
import { modulePropsDecoder, linkedVCPropsDecoder } from "../lib";
|
||||
|
||||
import VisualConsoleItem, {
|
||||
VisualConsoleItemProps,
|
||||
itemBasePropsDecoder,
|
||||
VisualConsoleItemType
|
||||
VisualConsoleItemType,
|
||||
VisualConsoleItemProps
|
||||
} from "../VisualConsoleItem";
|
||||
|
||||
export type ColorCloudProps = {
|
||||
|
|
|
@ -7,6 +7,7 @@ describe("function parseIntOr", () => {
|
|||
expect(parseIntOr("a1", null)).toBe(null);
|
||||
expect(parseIntOr("1", null)).toBe(1);
|
||||
expect(parseIntOr(false, null)).toBe(null);
|
||||
expect(parseIntOr(true, null)).toBe(null);
|
||||
expect(parseIntOr(1, null)).toBe(1);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -101,7 +101,7 @@ export function modulePropsDecoder(data: UnknownObject): WithModuleProps {
|
|||
return {
|
||||
moduleId: parseIntOr(id, null),
|
||||
moduleName: typeof name === "string" && name.length > 0 ? name : null,
|
||||
...agentPropsDecoder(data)
|
||||
...agentPropsDecoder(data) // Object spread: http://es6-features.org/#SpreadOperator
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue