aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/identicon.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-06-13 04:27:04 +0800
committerGitHub <noreply@github.com>2017-06-13 04:27:04 +0800
commit27220b7bcd5ea1ebdae3bc1b494d28d9c828918c (patch)
treec9385fba3d742ca9cbfb9f3b4c6c9ef29c4f4a1b /ui/app/components/identicon.js
parent57d1a1f1860e50837104a10b7b9f86d398c795ec (diff)
parent8af41f1b0539e70cf4c6e1f4a9f4b10ad13656fc (diff)
downloadtangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.gz
tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.zst
tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.zip
Merge branch 'master' into i#1203MainNetSwitch
Diffstat (limited to 'ui/app/components/identicon.js')
-rw-r--r--ui/app/components/identicon.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/ui/app/components/identicon.js b/ui/app/components/identicon.js
index 6d4871d02..9de854b54 100644
--- a/ui/app/components/identicon.js
+++ b/ui/app/components/identicon.js
@@ -1,6 +1,7 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
+const isNode = require('detect-node')
const findDOMNode = require('react-dom').findDOMNode
const jazzicon = require('jazzicon')
const iconFactoryGen = require('../../lib/icon-factory')
@@ -40,8 +41,10 @@ IdenticonComponent.prototype.componentDidMount = function () {
var container = findDOMNode(this)
var diameter = props.diameter || this.defaultDiameter
- var img = iconFactory.iconForAddress(address, diameter, false)
- container.appendChild(img)
+ if (!isNode) {
+ var img = iconFactory.iconForAddress(address, diameter, false)
+ container.appendChild(img)
+ }
}
IdenticonComponent.prototype.componentDidUpdate = function () {
@@ -58,6 +61,8 @@ IdenticonComponent.prototype.componentDidUpdate = function () {
}
var diameter = props.diameter || this.defaultDiameter
- var img = iconFactory.iconForAddress(address, diameter, false)
- container.appendChild(img)
+ if (!isNode) {
+ var img = iconFactory.iconForAddress(address, diameter, false)
+ container.appendChild(img)
+ }
}