Skip to content

Commit 2fbb78e

Browse files
Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 7dd1106 commit 2fbb78e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/updateSchema.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ async function sendUpdateEmail() {
3333
}
3434

3535
for (const userId of userIds) {
36-
const [user] = query('SELECT email, name FROM "user" WHERE id = ?', [userId]);
37-
const activePlugins = query('SELECT name, id FROM plugin WHERE user_id = ? AND status = 1', [userId]);
36+
const user = query('SELECT email, name FROM "user" WHERE id = ?', [userId]);
37+
if (!user || user.length === 0) continue;
38+
const [{ email, name }] = user;
3839
const emailBody = `We have recently updated our plugin system to support CodeMirror editor. Following plugins are pending update to specify supported editor:
3940
<ul>
4041
${activePlugins

0 commit comments

Comments
 (0)