Fix: Resetting backgroundImage throws

This commit is contained in:
Rossen Hristov
2017-01-06 14:34:46 +02:00
parent 3329196b48
commit 7f52dc3c2a

View File

@@ -1480,6 +1480,11 @@ export const backgroundImageProperty = new CssProperty<Style, string>({
let url: string = newValue;
let isValid = false;
if (url === undefined){
style.backgroundInternal = currentBackground.withImage(undefined);
return;
}
let match = url.match(pattern);
if (match && match[2]) {
url = match[2];