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.

getData() method always returns null

See original GitHub issue

I am trying to implement transactions list storing with:

saveTransactionData(txnData) {
    let txnList = getData('txns')
    console.log(txnList)
    if (!txnList) {
      txnList = []
    }
    console.log(txnList)

    txnList.push(txnData)
    setData('txns', txnList, 30, 'd')
  }

But getData('txns') always returns null even if value exists in the Local Storage. So I can’t save a list, I always receive only last transaction in storage.

What is wrong?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
notjiamcommented, Aug 13, 2019

@mazipan I think this issue related with my pull request https://github.com/mazipan/nuxt-storage/pull/76

0reactions
Quineonecommented, Mar 19, 2020

This bug still reproduce in "nuxt-storage": "^1.2.2", nuxt version is "nuxt": "^2.0.0"

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clipboard.GetDataObject() always returns null - Stack Overflow
Basically, the problem is that dataObject.GetData() always returns null even if dataObject.GetDataPresent() returned true earlier.
Read more >
In the VS extension, Clipboard.GetData always returns null if ...
GetData method always returns null . Here is the simplified code: [Serializable] public class MyObject { public MyObject() { MyProperty = "Some Value";...
Read more >
IDataObject GetData Method is always null - CodeProject
The image above is always null. I have tried every way of getting data out of the GetData() method but nothing works.
Read more >
NullReferenceException Class (System) - Microsoft Learn
You get a null return value from a method, and then call a method on the returned type. This sometimes is the result...
Read more >
Product Attribute always returns null - Magento Stack Exchange
Let's try this way, creates /etc/catalog_attributes.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
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