This commit is contained in:
CDeenen
2021-12-22 23:04:06 +01:00
parent dce419d7c3
commit 49bc188dde
4 changed files with 14 additions and 4 deletions

View File

@@ -66,7 +66,7 @@ Instructions and more info can be found in the <a href="https://github.com/CDeen
Module manifest: https://raw.githubusercontent.com/CDeenen/MaterialDeck/Master/module.json
## Software Versions & Module Incompatibilities
<b>Foundry VTT:</b> Tested on 0.7.9 - 0.9<br>
<b>Foundry VTT:</b> Tested on 0.7.9 - 0.8.5<br>
<b>Module Incompatibilities:</b> None known.<br>
## Developer Guide

View File

@@ -1,4 +1,11 @@
# Changelog Material Deck Module
### v1.4.8 - 22-12-2021
Fixes:
<ul>
<li>'Device Configuration' would not save its settings properly</li>
</ul>
### v1.4.7 - 20-12-2021
Fixes:
<ul>

View File

@@ -2,7 +2,7 @@
"name": "MaterialDeck",
"title": "Material Deck",
"description": "Material Deck allows you to control Foundry using an Elgato Stream Deck",
"version": "1.4.7",
"version": "1.4.8",
"author": "CDeenen",
"authors": {
"name": "CDeenen",

View File

@@ -1214,7 +1214,11 @@ export class deviceConfig extends FormApplication {
*/
getData() {
this.devices = [];
const dConfig = game.settings.get(moduleName, 'devices');
let dConfig = game.settings.get(moduleName, 'devices');
if (Object.prototype.toString.call(game.settings.get('MaterialDeck', 'devices')) === "[object String]") {
dConfig = {};
game.settings.set(moduleName, 'devices', dConfig);
}
for (let d of streamDeck.buttonContext) {
let type;
@@ -1263,7 +1267,6 @@ export class deviceConfig extends FormApplication {
let dConfig = game.settings.get(moduleName, 'devices');
delete dConfig[id];
dConfig[id] = {enable: event.currentTarget.checked}
game.settings.set(moduleName, 'devices', dConfig);
}
}