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

[Bug Report] undefined injectedGlobalOptions #182

Open
FirstSanny opened this issue Jan 26, 2023 · 2 comments · May be fixed by #224
Open

[Bug Report] undefined injectedGlobalOptions #182

FirstSanny opened this issue Jan 26, 2023 · 2 comments · May be fixed by #224

Comments

@FirstSanny
Copy link

Bug 描述 Bug description

In the usePagination function we are running into the problem that injectedGlobalOptions are undefined in this line
pagination: (_injectedGlobalOption = injectedGlobalOptions.pagination) !== null && _injectedGlobalOption !== void 0 ? _injectedGlobalOption : {}
When just replacing injectedGlobalOptions.pagination with injectedGlobalOptions?.pagination it works.

代码重现 Reproduce

I honestly dont know how to reproduce it.

期望结果 Desired result

No undefined error and breaking the code.

其他信息 Other information

@LuXDAmore
Copy link

Same for me

image

image

This line is undefined

const injectedGlobalOptions = vueDemi.inject(GLOBAL_OPTIONS_PROVIDE_KEY, {});
I'm using the same service on every page with the same data, but just in one page is broken with this error.

LuXDAmore added a commit to LuXDAmore/vue-request that referenced this issue Jan 8, 2024
fix: undefined injectedGlobalOptions close AttoJS#182
@LuXDAmore LuXDAmore linked a pull request Jan 8, 2024 that will close this issue
@liuhean
Copy link

liuhean commented Jan 30, 2024

我出现类似问题,最终发现是各个组件库依赖的vue-demi的版本不一致导致的问题

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

Successfully merging a pull request may close this issue.

3 participants