Skip to content

Commit

Permalink
fix: apply perk failed sometimes.
Browse files Browse the repository at this point in the history
  • Loading branch information
cangzhang committed Apr 16, 2020
1 parent 85ce32b commit 405e282
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "champ-r",
"version": "0.9.0-pre.5",
"version": "0.9.0-pre.6",
"license": "MIT",
"description": "Get champion items for lol, Windows only.",
"productName": "ChampR",
Expand Down Expand Up @@ -146,7 +146,7 @@
"package.json"
],
"win": {
"icon": "./src/assets/app-icon.ico",
"icon": "./src/assets/app-icon.png",
"requestedExecutionLevel": "highestAvailable"
}
},
Expand Down
Binary file removed src/assets/app-icon.ico
Binary file not shown.
Binary file added src/assets/app-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 2 additions & 5 deletions src/modules/popup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ export default function Popup() {
const [position, setPosition] = useState('');
const [perks, setPerkList] = useState([]);

useEffect(() => {
lcu.current = new LCUService(lolDir);
lcu.current.getAuthToken();
}, [lolDir]);

useEffect(() => {
getChampions(lolVer)
.then(championList => {
Expand Down Expand Up @@ -64,6 +59,8 @@ export default function Popup() {
if (!lcu.current.applyPerk || !lcu.current.active)
return;

lcu.current = new LCUService(lolDir);
await lcu.current.getAuthToken();
const res = await lcu.current.applyPerk({
...perk,
name: `${perk.alias} @ ${perk.position}`,
Expand Down

0 comments on commit 405e282

Please sign in to comment.