Skip to content

Closing Tab action in lib/actions/header.is cause TypeError #1046

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

Closed
2 tasks done
ppot opened this issue Nov 27, 2016 · 0 comments
Closed
2 tasks done

Closing Tab action in lib/actions/header.is cause TypeError #1046

ppot opened this issue Nov 27, 2016 · 0 comments

Comments

@ppot
Copy link
Contributor

ppot commented Nov 27, 2016

  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: macOS Sierra 10.12
  • Hyper.app version: 0.8.3
  • Relevent information from devtools:
bundle.js:17759 Uncaught TypeError: Cannot read property 'children' of undefined
  • The issue is reproducible in vanilla Hyper.app:

Issue

Closing Tab call the CLOSE_TAB event. The event work with a single session opened. With 2 sessions or more There is an error from the dispatch of userExitTermGroup(uid)

Testing this with Tab then 2 session
Term-group UID: "969e616e-fdf9-4ed8-8f7c-d3d599f7cd5a"
Term-group children: [ "ac4105f5-2780-49fa-8b44-68e1aadeefd1", "f92333bf-6bad-4ad7-98fa-32722192f6b9"]

Now in the userExitTermGroup(uid) we can see 2 cases at the end:

        if (group.sessionUid) {
          dispatch(userExitSession(group.sessionUid));
        } else {
          group.children.forEach(childUid => {
            dispatch(userExitTermGroup(childUid));
          });
        }

We can see in the else case that on the new dispatch(userExitTermGroup(childUid));. The group dosen't have children anymore since they where called in the first else pass.

Testing this in my PR I can see that. With a single pane.
I can console.log(onRoot EXIT called)
But with more than one Pane. No action are received.

UPDATE

  • After more investigation, it look like the closeTab(i) go for closing the active session but not the - activeTab.
  • The current process close only one session and keep others open in the pty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants