Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'call') #814

Open
brouxel opened this issue Jan 6, 2025 · 0 comments
Open

TypeError: Cannot read properties of undefined (reading 'call') #814

brouxel opened this issue Jan 6, 2025 · 0 comments

Comments

@brouxel
Copy link

brouxel commented Jan 6, 2025

Hi,
I got this error trying to use the ep_mypads plugin.

[2025-01-06T17:36:19.473] [ERROR] server - TypeError: Cannot read properties of undefined (reading 'call')
    at Database.set (/home/www-data/pad/node_modules/.pnpm/[email protected]/node_modules/ueberdb2/dist/index.js:343429:29)
    at setK (/home/www-data/pad/src/plugin_packages/.versions/[email protected]/storage.js:190:46)
    at done (/home/www-data/pad/src/plugin_packages/.versions/[email protected]/storage.js:195:9)
    at module.exports.storage.fn.setKeys (/home/www-data/pad/src/plugin_packages/.versions/[email protected]/storage.js:200:5)
    at Object.init (/home/www-data/pad/src/plugin_packages/.versions/[email protected]/configuration.js:228:18)
    at module.exports.hooks.init [as hook_fn] (/home/www-data/pad/src/plugin_packages/.versions/[email protected]/hooks.js:46:19)
    at <anonymous> (/home/www-data/pad/src/static/js/pluginfw/hooks.ts:273:18)
    at new Promise (<anonymous>)
    at callHookFnAsync (/home/www-data/pad/src/static/js/pluginfw/hooks.ts:236:16)
    at <anonymous> (/home/www-data/pad/src/static/js/pluginfw/hooks.ts:351:54)
    at Array.map (<anonymous>)
    at Object.exports.aCallAll (/home/www-data/pad/src/static/js/pluginfw/hooks.ts:351:13)
    at <anonymous> (/home/www-data/pad/src/static/js/pluginfw/plugins.ts:120:17)
    at Array.map (<anonymous>)
    at Object.exports.update (/home/www-data/pad/src/static/js/pluginfw/plugins.ts:118:47)
    at Object.exports.start (/home/www-data/pad/src/node/server.ts:171:5)

This can be easily fixed (it seems) with the following.

diff --git a/index.ts b/index.ts
index d314c22..fd7faed 100644
--- a/index.ts
+++ b/index.ts
@@ -67,6 +67,7 @@ const cbDb: CBDBType= {
   init: () => {},
   flush: () => {},
   get: () => {},
+  set: () => {},
   remove: () => {},
   findKeys: () => {},
   close: () => {},

Note: I tried to create a pull request but don't have permission to create a branch, sorry for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant