Merge pull request #1809 from albertgasset/MOBILE-2915

Mobile 2915
main
Juan Leyva 2019-03-14 11:36:02 +01:00 committed by GitHub
commit 9cf19b0694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -579,8 +579,6 @@ export class CoreSite {
return this.ongoingRequests[cacheId].then((response) => {
// Clone the data, this may prevent errors if in the callback the object is modified.
return this.utils.clone(response);
}).catch((error) => {
return Promise.reject(this.utils.clone(error));
});
}
@ -701,8 +699,6 @@ export class CoreSite {
return promise.then((response) => {
// We pass back a clone of the original object, this may prevent errors if in the callback the object is modified.
return this.utils.clone(response);
}).catch((error) => {
return Promise.reject(this.utils.clone(error));
});
}

View File

@ -38,10 +38,12 @@ export class CoreStyleComponent implements OnChanges {
* Component being changed.
*/
ngOnChanges(changes: { [name: string]: SimpleChange }): void {
const css = this.prefixCSS(this.css, this.prefix);
if (this.element && this.element.nativeElement) {
this.element.nativeElement.innerHTML = '<style>' + css + '</style>';
const style = document.createElement('style');
style.innerText = this.prefixCSS(this.css, this.prefix);
this.element.nativeElement.innerHTML = '';
this.element.nativeElement.appendChild(style);
}
}