question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Model.clone() broken for namespaced services (PR attached)

See original GitHub issue

Steps to reproduce

Setup a service in the Vuex store with a namespace: eg

  plugins: [
    service('asset-types', {
      namespace: 'assetTypes',
    }),

Try to .clone() a Model from that namespaced service

      const { AssetType } = this.$FeathersVuex;
      const assetType = new AssetType();
      this.assetTypeCopy = assetType.clone();

Expected behavior

The model is cloned.

Actual behavior

Error: service-module.js?9849:153 Uncaught (in promise) TypeError: Cannot read property ‘keepCopiesInStore’ of undefined

System configuration

Module versions 1.4.8

Looks like it is a 1 line fix in service-module.js change

if (store.state[Model.servicePath].keepCopiesInStore) {

to

if (store.state[namespace].keepCopiesInStore) {

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
metareasoncommented, Aug 6, 2018

PR in #146 with a fix thanks!

0reactions
marshallswaincommented, Sep 17, 2018

Thanks for the fix. The PR has been merged and released in 1.5.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting "type or namespace name could not be found" but ...
I was throwing stuff around, changing names, renaming Models, and all of a sudden I got this error: Error CS0246 The type or...
Read more >
Troubleshooting CI/CD - GitLab Docs
GitLab provides several tools to help make troubleshooting your pipelines easier. This guide also lists common issues and possible solutions.
Read more >
Authorization Overview - Kubernetes
Learn more about Kubernetes authorization, including details about creating policies using the supported authorization modules.
Read more >
Supporting multitenancy with isolated namespaces
Support multitenancy in Amazon QuickSight by implementing namespaces to isolate sets of groups and users.
Read more >
Add namespaces to queries using WITH XMLNAMESPACES
WITH XMLNAMESPACES lets you include XML namespaces in FOR XML queries. For example, consider the following FOR XML query: SQL Copy.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found