mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-13 10:55:05 +02:00
Version bump 2.0.1 and Fix db function validation
This commit is contained in:
parent
dc9c307663
commit
d4525ad5ca
3 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "audiobookshelf-client",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "Audiobook manager and player",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue