Commit ab16ae97915da3c81b8b1c822b11e95955616172
Merge pull request #564 from ssbc/fix-gathering-compare-image
fix #563Matt McKegg authored on 6/19/2017, 11:13:26 AM
GitHub committed on 6/19/2017, 11:13:26 AM
Parent: 47ec0958bdfe477219b584cedda2d6090c92ba64
Parent: dcf377676e63207a9e8d4636f95a6c7a7b1f0661
Files changed
modules/gathering/sheet/edit.js | changed |
modules/gathering/sheet/edit.js | ||
---|---|---|
@@ -154,13 +154,17 @@ | ||
154 | 154 … | } |
155 | 155 … | } |
156 | 156 … | |
157 | 157 … | function compareImage (a, b) { |
158 | - a = typeof a === 'object' ? a.link : a | |
159 | - b = typeof b === 'object' ? b.link : b | |
158 … | + a = isObject(a) ? a.link : a | |
159 … | + b = isObject(b) ? b.link : b | |
160 | 160 … | return a === b |
161 | 161 … | } |
162 | 162 … | |
163 … | +function isObject (value) { | |
164 … | + return value && typeof value === 'object' | |
165 … | +} | |
166 … | + | |
163 | 167 … | function FocusHook () { |
164 | 168 … | return function (element) { |
165 | 169 … | setTimeout(() => { |
166 | 170 … | element.focus() |
Built with git-ssb-web