From 56444fb9275855640b958b92e963684191eb526f Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Thu, 9 Jul 2015 11:26:27 +0300 Subject: [PATCH] throw error if page not specified --- ui/builder/builder.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/builder/builder.ts b/ui/builder/builder.ts index 5b6458c05..288236120 100644 --- a/ui/builder/builder.ts +++ b/ui/builder/builder.ts @@ -217,7 +217,11 @@ function loadCustomComponent(componentPath: string, componentName?: string, attr // Add component CSS file if exists. var cssFileName = fileName.replace(".xml", ".css"); if (fs.File.exists(cssFileName) && parentPage) { - parentPage.addCssFile(cssFileName); + if (parentPage) { + parentPage.addCssFile(cssFileName); + } else { + throw new Error("CSS file found but no page specified. Please specify page in the options!"); + } } return result;