mirror of https://github.com/espruino/BangleApps
Return empty array instead of object if JSON read fails
parent
936b6aabee
commit
beff82a2f9
|
@ -41,7 +41,7 @@ exports.reply = function (options) {
|
|||
require("Storage").readJSON(
|
||||
options.fileOverride || "replies.json",
|
||||
true
|
||||
) || {};
|
||||
) || [];
|
||||
replies.forEach((reply) => {
|
||||
menu = Object.defineProperty(menu, reply.text, {
|
||||
value: () => constructReply(options.msg ?? {}, reply.text, resolve),
|
||||
|
|
Loading…
Reference in New Issue