-
Notifications
You must be signed in to change notification settings - Fork 912
fix(utils): check if holder is object in getProp util
#738
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
fix(utils): check if holder is object in getProp util
#738
Conversation
Added a check for both ways a string can be defined. This fixes an exception when the server returns a string instead of an object. See #699 for more information.
JoaoPedroAS51
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @CraftingGamerTom! Thank you for the PR! Nice work 😄
My PR #941 was for dev branch, yours is for master :)
What do you think about using typeof holder !== 'object'?
holder is object in getProp util
|
It won't work / fix the problem I solved in #699 . But I'm sure that you guys will sort that out cause confused how I can have a PR for 5 months ago and no responses from anyone and then out of nowhere that contribution gets scooped up into a different PR for the exact same issue and it gets approved and I get asked if it is okay 😂 |
|
We were busy on other things in the last few months, but we're here now. I'm so sorry for the delay. Why it won't work / fix the problem you solved? |
|
@CraftingGamerTom Sorry, I think we had a misunderstanding. What I was trying to say is that my PR #941 was merged into v5 ( |
|
I owe you an apology. I'm sorry. Not only did I misunderstand the plan, I also jumped the gun and misunderstood your (much more elegant) solution. I was admittedly butt-hurt because it was not apparent that you created a PR for any other reason other than to solve the same problem but not consider my PR. Then yours was approved quickly. I didn't see any other issues your PR was related to and assumed you came out of nowhere on #699 and just remade my PR pointed at the correct branch. I'm not very familiar with the contribution process to the nuxt-community but I think I've learned a lot today. Okay, I will put this back to pointing at master. I believe I did intend this for dev? It was so long ago. I don't remember. Also, I originally did not think your solution would work because I had a false understanding that a String object (created with a constructor) would not work with your solution - my testing showed it would work. Nice work on this. Some more info on this: I also updated the codepen with some better examples |
Thank you @JoaoPedroAS51 for the more elegant solution
|
@CraftingGamerTom No problem! And thank you for having time to find and fix this issue :) |
|
@CraftingGamerTom Sorry again for the confusion. Just fixed the other PR/commit 23ecb31, marking you as author :) |
…erbase * upstream/master: (44 commits) chore(docs): Add note about gotcha when extending (nuxt-community#710) fix(utils): check if `holder` is `object` in `getProp` util (nuxt-community#738) chore(deps): update `@nuxtjs/axios` to v5.12.4 Update facebook.md (nuxt-community#564) fix(module): build core files to `core` dir (nuxt-community#909) chore: update all dependencies, lock axios to 5.12.1 (nuxt-community#911) chore(demo): add express-jwt algorithms (nuxt-community#912) fix(oauth): nanoid import (nuxt-community#906) fix: path to utilities folder docs: fix typo in options (nuxt-community#799) docs: fix broken link in strategy section (nuxt-community#754) docs: update readme.md (nuxt-community#704) docs(scheme): add custom scheme creation docs (nuxt-community#692) docs(local scheme): clearer understanding of `autoFetchUser` option (nuxt-community#677) docs(local scheme): add `globalToken` (nuxt-community#667) chore(release): 4.9.1 chore: update lockfile demo: fix `data` object property (nuxt-community#580) docs(options): fix typo in callback paragraph (nuxt-community#582) docs(oauth2): fix broken link (nuxt-community#609) ...
Added a check for both ways a string can be defined. This fixes an exception when the server returns a string instead of an object. See #699 for more information.