diff options
author | Xue Gao <xg353y@intl.att.com> | 2019-07-18 04:29:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-18 04:29:33 +0000 |
commit | 0ce38c26f68efa97f7d16ec9bbba5888982d97ba (patch) | |
tree | 9c62d416f3b56c145d4dddb8a06fa1e77d691631 /ui-react/src/components/loop_viewer/svg/LoopSvg.js | |
parent | a60064d01f6d37c0a75f1020010e5511d939785e (diff) | |
parent | 5976c17b09b82db4d5dbce7cb7fe3b1b27891104 (diff) |
Merge "Fix warnings"
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 }) |