Skip to content
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

for loop syntax error #65

Open
schiebel opened this issue Mar 10, 2021 · 0 comments
Open

for loop syntax error #65

schiebel opened this issue Mar 10, 2021 · 0 comments

Comments

@schiebel
Copy link

I'm new to electron, and I am going through an out of date and incomplete tutorial for nteract. I wanted to see the version numbers so I installed about-window. However, I get a syntax error (shown from about-window devtools):
Screen Shot 2021-03-10 at 5 24 39 PM
I'm not sure if this is because I'm using an old version of something or a new version of something (or a bad mix). However, the fix for this (in the JS) is:

*** about-window/src/renderer.js~	2021-03-10 17:13:43.000000000 -0500
--- about-window/src/renderer.js	2021-03-10 17:14:25.000000000 -0500
***************
*** 63,75 ****
          const version_info = Array.isArray(info.use_version_info)
              ? info.use_version_info
              : ['electron', 'chrome', 'node', 'v8'].map(e => [e, process.versions[e]]);
!         for (const [name, value] of version_info) {
              const tr = document.createElement('tr');
              const name_td = document.createElement('td');
!             name_td.innerText = name;
              tr.appendChild(name_td);
              const version_td = document.createElement('td');
!             version_td.innerText = ' : ' + value;
              tr.appendChild(version_td);
              versions.appendChild(tr);
          }
--- 63,75 ----
          const version_info = Array.isArray(info.use_version_info)
              ? info.use_version_info
              : ['electron', 'chrome', 'node', 'v8'].map(e => [e, process.versions[e]]);
!         for (const vi of version_info) {
              const tr = document.createElement('tr');
              const name_td = document.createElement('td');
!             name_td.innerText = vi[0];
              tr.appendChild(name_td);
              const version_td = document.createElement('td');
!             version_td.innerText = ' : ' + vi[1];
              tr.appendChild(version_td);
              versions.appendChild(tr);
          }

The versions are (using about-window!):
Screen Shot 2021-03-10 at 5 45 49 PM
Since this change is more basic than what is currently in renderer.ts I assume it should work with more configurations...

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

1 participant