if condition fixed + test added

This commit is contained in:
Vladimir Enchev
2015-09-10 13:29:04 +03:00
parent 2d155f941d
commit e162b2032f
2 changed files with 22 additions and 1 deletions

View File

@ -99,7 +99,9 @@ export function getComponentModule(elementName: string, namespace: string, attri
} else {
throw new Error("Code file atribute is valid only for pages!");
}
} else if (attributes[CSSFILE]) {
}
if (attributes[CSSFILE]) {
if (instance instanceof pages.Page) {
var cssFilePath = attributes[CSSFILE].trim();
if (cssFilePath.indexOf("~/") === 0) {