git ssb

10+

Matt McKegg / patchwork



Commit dcf377676e63207a9e8d4636f95a6c7a7b1f0661

fixes https://github.com/ssbc/patchwork/issues/563

```
TypeError: Cannot read property 'link' of null
    at compareImage (/home/dinosaur/repos/ssbc/patchwork/modules/gathering/sheet/edit.js:159:32)
    at HTMLButtonElement.save (/home/dinosaur/repos/ssbc/patchwork/modules/gathering/sheet/edit.js:112:14)
```
Michael Williams committed on 6/19/2017, 9:53:52 AM
Parent: 7d0bb2a423493cd547b8262bd6ac410900ff37c6

Files changed

modules/gathering/sheet/edit.jschanged
modules/gathering/sheet/edit.jsView
@@ -154,13 +154,17 @@
154154 }
155155 }
156156
157157 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
160160 return a === b
161161 }
162162
163 +function isObject (value) {
164 + return value && typeof value === 'object'
165 +}
166 +
163167 function FocusHook () {
164168 return function (element) {
165169 setTimeout(() => {
166170 element.focus()

Built with git-ssb-web