Merge pull request #3428 from NativeScript/bkg-img-fix

Fix: Resetting backgroundImage throws
This commit is contained in:
Rossen Hristov
2017-01-06 14:49:07 +02:00
committed by GitHub

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];