Replace all gorm .Scan() calls with .Find()

if the argument is a model. This ensures that the proper gorm hooks are
called which was causing the full screen view on the Places page to
crash.

Also fixed a bug in Messages.js that caused a crash.
This commit is contained in:
viktorstrate
2021-04-15 16:27:26 +02:00
parent 788a8e7c62
commit 8e8abe7d37
5 changed files with 8 additions and 8 deletions

View File

@@ -54,7 +54,7 @@ const Messages = () => {
const RefDiv = props => <div {...props} ref={x => x && ref(x)} />
switch (message.type) {
case 'message':
case 'Message':
return props => (
<Message
as={RefDiv}
@@ -66,7 +66,7 @@ const Messages = () => {
{...props}
/>
)
case 'progress':
case 'Progress':
return props => (
<MessageProgress
as={RefDiv}