Skip to content

Commit

Permalink
Add null check for sign text (PrismarineJS#1553)
Browse files Browse the repository at this point in the history
Needed in some servers
  • Loading branch information
u9g authored Dec 31, 2020
1 parent 69ced8b commit 97dc43b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugins/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function inject (bot, { version, storageBuilder }) {
if (data === null || data === '') return ''

const json = JSON.parse(data)
if (!('text' in json)) return ''
if (json === null || !('text' in json)) return ''

json.text = json.text.replace(/^"|"$/g, '')
return json
Expand Down

0 comments on commit 97dc43b

Please sign in to comment.