Commit cb5cf78e authored by Zéfling's avatar Zéfling 🎨
Browse files

Reduce lag

parent ce9358cb
......@@ -15,23 +15,20 @@ export class ElementLineComponent implements OnChanges {
browsers = [];
constructor(private appService: AppService) {
}
constructor(private appService: AppService) { }
ngOnChanges(changes: SimpleChanges) {
if (changes['element'].currentValue !== changes['element'].previousValue) {
setTimeout(() => {
const browser = this.appService.browsers;
this.browsers = [];
for (const i in browser) {
if (browser[i]) {
this.browsers.push({
id: i,
...this.element.support[i]
});
}
const browser = this.appService.browsers;
this.browsers = [];
for (const i in browser) {
if (browser[i]) {
this.browsers.push({
id: i,
...this.element.support[i]
});
}
});
}
}
}
......@@ -39,6 +36,4 @@ export class ElementLineComponent implements OnChanges {
return typeof data === 'object' && data.length;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment