Skip to content

Commit

Permalink
Fix autologin crash if there are no users stored
Browse files Browse the repository at this point in the history
  • Loading branch information
solymosi committed Jan 26, 2021
1 parent 23782be commit d06fa88
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A program **felturbózza a Neptun-odat**: gyorsabb tárgy- és vizsgafelvétel,

## Legújabb verzió

* Legfrissebb verzió: **2.0.0**
* Legfrissebb verzió: **2.0.1**
* Kiadás dátuma: **2021. január 26.**

Ha tudod, mit csinálsz, [kattints ide a telepítéshez](https://github.com/solymosi/npu/releases/latest/download/npu.user.js).<br>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npu",
"version": "2.0.0",
"version": "2.0.1",
"description": "Felturbózza a Neptun-odat",
"main": "npu.user.js",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src/modules/autoLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const storage = require("../storage");
function getLoginUsers() {
const users = [];
const list = storage.get("users", utils.getDomain());
if (!list) {
return users;
}
Object.keys(list).forEach(user => {
if (typeof list[user].password === "string" && list[user].password !== "") {
users.push(user);
Expand Down

0 comments on commit d06fa88

Please sign in to comment.