electron-about-window icon indicating copy to clipboard operation
electron-about-window copied to clipboard

for loop syntax error

Open schiebel opened this issue 3 years ago • 0 comments

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...

schiebel avatar Mar 10 '21 22:03 schiebel