Skip to content

Commit 3e8f222

Browse files
committed
refactor(modal): fix error when open modal without properties
1 parent e62e6f4 commit 3e8f222

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

projects/truly-ui/src/components/modal/services/modal.service.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,11 @@ export class ModalService implements OnDestroy {
158158
}
159159

160160
private setModalProperties(properties) {
161-
Object.keys(properties).forEach( (value, index) => {
162-
(this.componentInjected.instance)[value] = properties[value];
163-
});
161+
if (properties) {
162+
Object.keys(properties).forEach( (value, index) => {
163+
(this.componentInjected.instance)[value] = properties[value];
164+
});
165+
}
164166
}
165167

166168
private setComponentWrapperProperties(config, identifier, parentElement) {

0 commit comments

Comments
 (0)