From 19c54bedd08e6241832ff166b2e861eed48f6097 Mon Sep 17 00:00:00 2001 From: Mario Ampov Date: Wed, 13 Sep 2017 15:12:44 +0200 Subject: [PATCH] Fix lint errors --- src/lib/api/ext/class.ts | 3 ++- src/lib/api/ext/img-src.ts | 3 ++- src/lib/api/ext/style.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/api/ext/class.ts b/src/lib/api/ext/class.ts index d80e9081c..0adc91a47 100644 --- a/src/lib/api/ext/class.ts +++ b/src/lib/api/ext/class.ts @@ -104,7 +104,8 @@ export class ClassDirective extends BaseFxDirective this._ngClassAdapter = new BaseFxDirectiveAdapter('ngClass', monitor, _ngEl, _renderer); this._classAdapter = new BaseFxDirectiveAdapter('class', monitor, _ngEl, _renderer); - this._classAdapter.cacheInput('class', isBrowser() ? _ngEl.nativeElement.getAttribute('class') || '' : ''); + const classValue = isBrowser() ? _ngEl.nativeElement.getAttribute('class') || '' : ''; + this._classAdapter.cacheInput('class', classValue); // Create an instance NgClass Directive instance only if `ngClass=""` has NOT been defined on // the same host element; since the responsive variations may be defined... diff --git a/src/lib/api/ext/img-src.ts b/src/lib/api/ext/img-src.ts index e18f48629..3d3d3e9c2 100644 --- a/src/lib/api/ext/img-src.ts +++ b/src/lib/api/ext/img-src.ts @@ -58,7 +58,8 @@ export class ImgSrcDirective extends BaseFxDirective implements OnInit, OnChange constructor(elRef: ElementRef, renderer: Renderer2, monitor: MediaMonitor) { super(monitor, elRef, renderer); - this._cacheInput('src', isBrowser() ? elRef.nativeElement.getAttribute('src') || '' : ''); + const srcValue = isBrowser() ? elRef.nativeElement.getAttribute('src') || '' : ''; + this._cacheInput('src', srcValue); } /** diff --git a/src/lib/api/ext/style.ts b/src/lib/api/ext/style.ts index b327e6931..a581cb1df 100644 --- a/src/lib/api/ext/style.ts +++ b/src/lib/api/ext/style.ts @@ -114,7 +114,8 @@ export class StyleDirective extends BaseFxDirective // Build adapter, `cacheInput()` interceptor, and get current inline style if any this._buildAdapter(this.monitor, _ngEl, _renderer); - this._base.cacheInput('style', isBrowser() ? _ngEl.nativeElement.getAttribute('style') || '' : '', true); + const styleValue = isBrowser() ? _ngEl.nativeElement.getAttribute('style') || '' : ''; + this._base.cacheInput('style', styleValue, true); // Create an instance NgStyle Directive instance only if `ngStyle=""` has NOT been defined on // the same host element; since the responsive versions may be defined...