From 5976c17b09b82db4d5dbce7cb7fe3b1b27891104 Mon Sep 17 00:00:00 2001 From: sebdet Date: Wed, 17 Jul 2019 13:59:33 +0200 Subject: Fix warnings Fix reported javascript warnings by NodeJS when compiling Issue-ID: CLAMP-426 Change-Id: Iebf369c0d3094fcbe83e9e5b1d6138b808105e46 Signed-off-by: sebdet --- ui-react/src/components/loop_viewer/svg/LoopSvg.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ui-react/src/components/loop_viewer') diff --git a/ui-react/src/components/loop_viewer/svg/LoopSvg.js b/ui-react/src/components/loop_viewer/svg/LoopSvg.js index 44356c1c..fa028c0d 100644 --- a/ui-react/src/components/loop_viewer/svg/LoopSvg.js +++ b/ui-react/src/components/loop_viewer/svg/LoopSvg.js @@ -23,7 +23,6 @@ import React from 'react'; import styled from 'styled-components'; import { withRouter } from "react-router"; -import LoopCache from '../../../api/LoopCache' import LoopService from '../../../api/LoopService' const LoopViewSvgDivStyled = styled.div` @@ -57,13 +56,13 @@ class LoopViewSvg extends React.Component { } componentWillReceiveProps(newProps) { - this.state.loopCache = newProps.loopCache; + this.setState({ loopCache: newProps.loopCache }); this.getSvg(); } getSvg() { LoopService.getSvg(this.state.loopCache.getLoopName()).then(svgXml => { - if (svgXml.length != 0) { + if (svgXml.length !== 0) { this.setState({ svgContent: svgXml }) } else { this.setState({ svgContent: LoopViewSvg.emptySvg }) -- cgit 1.2.3-korg