Skip to content

Commit

Permalink
Fixing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanV2 committed Jun 10, 2023
1 parent d382f34 commit 0df65ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.com/DaanV2/Vscode-Hue-Am-I-Doing"
},
"engines": {
"vscode": "^1.77.0"
"vscode": "^1.79.0"
},
"categories": [
"Other",
Expand All @@ -35,7 +35,8 @@
"package": "webpack --mode production --devtool hidden-source-map",
"pretest": "npm run compile",
"lint": "eslint src --ext ts",
"test": "jest --coverage"
"test": "jest --coverage",
"postversion": "git push && git push --tags"
},
"dependencies": {
"@daanv2/hue": "^1.0.19"
Expand Down
10 changes: 6 additions & 4 deletions src/handlers/config/migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import { BridgeHandler } from "../bridge";
* @param bridge The bridge to migrate
* @returns True if the config was migrated, false otherwise
*/
export async function migrateConfig(bridge: BridgeHandler) : Promise<boolean> {
export async function migrateConfig(bridge: BridgeHandler): Promise<boolean> {
let result = false;

//Get the name
if (bridge.config.name === undefined) {
const config = await bridge.app.getConfig();
bridge.config.name = config.name;
result = true;
try {
const config = await bridge.app.getConfig();
bridge.config.name = config.name;
result = true;
} catch (e) {}
}

return result;
Expand Down

0 comments on commit 0df65ce

Please sign in to comment.