mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Version bump 2.0.1 and Fix db function validation
This commit is contained in:
parent
dc9c307663
commit
d4525ad5ca
@ -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…
Reference in New Issue
Block a user