1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Server: Improve error when attempting to load certain routes that do not exist (#13683)

This commit is contained in:
Henry Heino
2025-11-15 00:58:36 -08:00
committed by GitHub
parent 4a0d9220ba
commit 9e9d2699b5
3 changed files with 9 additions and 3 deletions

View File

@@ -15,3 +15,7 @@ export function checkObjectHasProperties(object: any, properties: string[]) {
if (!(prop in object)) throw new Error(`Missing property "${prop}": ${JSON.stringify(object)}`);
}
}
export const hasOwnProperty = (object: object, property: string): boolean => {
return !!object && Object.prototype.hasOwnProperty.call(object, property);
};