throw error if not string

This commit is contained in:
Vladimir Enchev
2015-08-28 11:16:26 +03:00
parent c12bb8366b
commit 035e381673

View File

@@ -924,9 +924,11 @@ export class View extends proxy.ProxyObject implements definition.View {
}
public setStyle(style: string): void {
if (types.isString(style)) {
this._applyInlineStyle(style);
if (!types.isString(style)) {
throw new Error("Parameter should be valid CSS string!");
}
this._applyInlineStyle(style);
}
public _updateLayout() {