diff --git a/client/package.json b/client/package.json index 44bf694d..d1328ea9 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf-client", - "version": "2.0.0", + "version": "2.0.1", "description": "Audiobook manager and player", "main": "index.js", "scripts": { diff --git a/package.json b/package.json index 4b27d5d5..801d6296 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf", - "version": "2.0.0", + "version": "2.0.1", "description": "Self-hosted audiobook server for managing and playing audiobooks", "main": "index.js", "scripts": { diff --git a/server/njodb/validators.js b/server/njodb/validators.js index 7b8a3224..16ea293c 100644 --- a/server/njodb/validators.js +++ b/server/njodb/validators.js @@ -53,10 +53,11 @@ const validateObject = (o) => { const validateFunction = (f) => { if (typeof f !== "function") { throw new TypeError("Not a function") - } else { - const fString = f.toString(); - if (/\s*function/.test(fString) && !/\W+return\W+/.test(fString)) throw new Error("Function must return a value"); } + // } else { + // const fString = f.toString(); + // if (/\s*function/.test(fString) && !/\W+return\W+/.test(fString)) throw new Error("Function must return a value"); + // } return f; }