diff --git a/src/app/components/noosfero-blocks/block.component.ts b/src/app/components/noosfero-blocks/block.component.ts index f1793a5..e9d2207 100644 --- a/src/app/components/noosfero-blocks/block.component.ts +++ b/src/app/components/noosfero-blocks/block.component.ts @@ -11,7 +11,7 @@ export class Block { @Input() owner: any; ngOnInit() { - let blockName = this.block.type ? this.block.type.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() : "default-block"; + let blockName = (this.block && this.block.type) ? this.block.type.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() : "default-block"; this.$element.replaceWith(this.$compile('')(this.$scope)); } -- libgit2 0.21.2