From 9315fe3c8c96aab6e1ec69d4012976c573b2a5c0 Mon Sep 17 00:00:00 2001 From: wenincode Date: Fri, 13 Oct 2023 15:13:43 -0600 Subject: [PATCH] Update style modifier for new structure --- ui/packages/consul-ui/app/modifiers/style.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ui/packages/consul-ui/app/modifiers/style.js b/ui/packages/consul-ui/app/modifiers/style.js index 337b56dc5b..adf5591f38 100644 --- a/ui/packages/consul-ui/app/modifiers/style.js +++ b/ui/packages/consul-ui/app/modifiers/style.js @@ -40,15 +40,17 @@ export default class StyleModifier extends Modifier { this._oldStyles = new Set(newStyles.map((e) => e[0])); } - didReceiveArguments() { - if (typeof this.args.named.delay !== 'undefined') { + modify(element, positional, named) { + this.element = element; + + if (typeof named.delay !== 'undefined') { setTimeout((_) => { - if (typeof this !== this.args.positional[0]) { - this.setStyles(this.args.positional[0]); + if (typeof this !== positional[0]) { + this.setStyles(positional[0]); } - }, this.args.named.delay); + }, named?.delay); } else { - this.setStyles(this.args.positional[0]); + this.setStyles(positional[0]); } } }