Expose configurable attributes property when loading components

This commit is contained in:
Akash Agrawal
2016-04-28 18:35:55 +05:30
parent 2d4c4c63bb
commit c2f084224a
8 changed files with 16 additions and 13 deletions

View File

@ -34,10 +34,12 @@ export function escapeRegexSymbols(source: string): string {
return source.replace(escapeRegex, "\\$&");
}
export function convertString(value: string): any {
export function convertString(value: any): any {
var result;
if (value.trim() === "") {
if (!types.isString(value)) {
result = value;
} else if (value.trim() === "") {
result = value;
} else {
// Try to convert value to number.
@ -50,7 +52,7 @@ export function convertString(value: string): any {
result = value;
}
}
return result;
}
@ -131,4 +133,4 @@ export function isDataURI(uri: string): boolean {
var firstSegment = uri.trim().split(',')[0];
return firstSegment && firstSegment.indexOf("data:") === 0 && firstSegment.indexOf('base64') >= 0;
}
}