How to handle null value in vue 3 #9616
endapal
started this conversation in
General Discussions
Replies: 1 comment
-
I don't see anything wrong with the But the error comes from vue-router, so maybe you can find something in this migration guide. You can reproduce the error when you define a route with a parameter like this: this.$router.push({ name: 'name-of-the-route' }); // => will error, parameter is missing
this.$router.push({ name: 'name-of-the-route', params: { myParam: null } }); // => will error, myParam cannot be null
this.$router.push({ name: 'name-of-the-route', params: { myParam: 'test' } }); // => that works Maybe that helps. Note that route parameters are case-sensitive. I noticed that the error says "StudyId" with an uppercase "S". That looks slightly suspicious. Check if it's spelled consistently in your code. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to handle null value in vue3 for studyIdReference? This used to work in before version but not any more after upgrade.
Projections v-if="canAddOrEditSAV" :siteId="siteIdReference" :isSAV="true" :visitItems="visitItems" :studyId="studyIdReference"
I get Missing required param "StudyId"
at Object.stringify (webpack-internal:///./node_modules/vue-router/dist/vue-router.mjs:1012:35)
at Object.resolve (webpack-internal:///./node_modules/vue-router/dist/vue-router.mjs:1469:28)
at Object.resolve (webpack-internal:///./node_modules/vue-router/dist/vue-router.mjs:3079:38)
at ReactiveEffect.eval [as fn] (webpack-internal:///./node_modules/vue-router/dist/vue-router.mjs:2190:78)
at ReactiveEffect.run (webpack-internal:///./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js:217:19)
at get value [as value] (webpack-internal:///./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js:1178:33)
at useLink (webpack-internal:///./node_modules/vue-router/dist/vue-router.mjs:2233:30)
at setup (webpack-internal:///./node_modules/vue-router/dist/vue-router.mjs:2279:68)
at callWithErrorHandling (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:296:18)
at setupStatefulComponent (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:7347:25)
export default {
name: "SiteProfile",
components: { FixedHeader, Projections},
data() {
return {
siteData: "",
visitItems: [],
studyIdReference: null,
siteProfileNavigation:[
{name:"Site Profile",icon:"ProtocolSites.png"},
{name:"Projections",icon:"monitoring.png"},
{name:"Associated Protocols",icon:"protocolProfile.png"},
{name:"Personnel",icon:"AccuralInformation.png"}],
bindHeader:false,
filter:""
};
},
Beta Was this translation helpful? Give feedback.
All reactions