diff options
author | sebdet <sebastien.determe@intl.att.com> | 2019-07-17 13:59:33 +0200 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2019-07-17 13:59:33 +0200 |
commit | 5976c17b09b82db4d5dbce7cb7fe3b1b27891104 (patch) | |
tree | e411376e08c9be347ec61eb4321fb17f678bde52 /ui-react/src/components/loop_viewer/svg/LoopSvg.js | |
parent | 2dacb9bd185db2c05de435d2bd446865e158e483 (diff) |
Fix warnings
Fix reported javascript warnings by NodeJS when compiling
Issue-ID: CLAMP-426
Change-Id: Iebf369c0d3094fcbe83e9e5b1d6138b808105e46
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/components/loop_viewer/svg/LoopSvg.js')
-rw-r--r-- | ui-react/src/components/loop_viewer/svg/LoopSvg.js | 5 |
1 files changed, 2 insertions, 3 deletions
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 }) |