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.

Patch does nothing

See original GitHub issue

I have no idea what I’m doing wrong, but it seems like patch is doing completely nothing (even with populated patches). How is this possible? No error thrown, just silently does nothing.

    let _rootElement = document.querySelector(el.value)
    
    let rootTree = h('div')
    let rootNode = createElement(rootTree)

    _rootElement.appendChild(rootNode)
    
    let updateFn = () => {
      let vElement = c.execute().value // this returns new VNode
      
      let patches = diff(rootTree, vElement) // this returns an object with few patches
      rootNode = patch(rootNode, patches) // THIS does nothing

      rootTree = vElement
    }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
arecommented, Sep 27, 2017

I think you cannot manipulate the vnodes after creating them, so check if you don’t append children somewhere in your code.

0reactions
gryphonmyerscommented, Jan 17, 2019

Would if I could!

Read more comments on GitHub >

github_iconTop Results From Across the Web

linux - How can I know if patch command is working?
I tried the -verbose option. I don't know how long it takes for patch to traverse the directory and look for the files...
Read more >
git apply does output nothing and does not patch anything
Usually "no output" is a good thing for linux tools. Have you checked if your files were in fact patched? · I know,...
Read more >
Patch command does not work - Power Platform Community
Solved: Hello, everyone, this is the first time I try to use the patch command, but I get stuck. Here is the situation:...
Read more >
Chapter 29. Problems applying a patch - eCosCentric
Usually there is no problem here and the patch could be applied completely. This message usually means that the patchfile was originally created...
Read more >
Patch command not doing anything : r/suckless - Reddit
The problem comes when lines that are near the actual changes are different. Usually you can just apply the patch and then manually...
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