Skip to content

Commit e4cb4e2

Browse files
committed
Merge branch 'hotfix/2.39.2' into main
2 parents 13d7467 + 003b5df commit e4cb4e2

File tree

6 files changed

+25
-45
lines changed

6 files changed

+25
-45
lines changed

package-lock.json

Lines changed: 11 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.39.1",
2+
"version": "2.39.2",
33
"name": "shieldmaiden",
44
"description": "A Dungeons and Dragons Combat Tracker",
55
"productName": "Shieldmaiden",

src/components/combat/actions/Manual.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export default {
196196
...mapActions(["setManual", "setMultipliers"]),
197197
...mapActions("tutorial", ["completeStep"]),
198198
focus() {
199-
this.$refs.input.focus();
199+
this.$refs.input?.focus();
200200
},
201201
typeLabel(type) {
202202
type = type.split("_");
@@ -248,7 +248,7 @@ export default {
248248
249249
//Reset values
250250
this.knob_value = 0;
251-
this.$refs.input.blur();
251+
this.$refs.input?.blur();
252252
this.setManual({ key: "clear" });
253253
this.setMultipliers({ type: "clear" });
254254
}
@@ -271,9 +271,10 @@ export default {
271271
},
272272
},
273273
mounted() {
274-
EventBus.$on("applyManualValue", (type) => {
275-
this.applyManual(type);
276-
});
274+
EventBus.$on("applyManualValue", this.applyManual);
275+
},
276+
beforeDestroy() {
277+
EventBus.$off("applyManualValue", this.applyManual);
277278
},
278279
directives: {
279280
scrollWheel: {

src/components/combat/actions/RollActions.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default {
254254
return index + 1 < length ? "+" : "";
255255
},
256256
startRoll(e, projectiles, option, action_index, action, category) {
257-
if (this.targeted && this.targeted.length) {
257+
if (this.targeted?.length) {
258258
this.rollObject = {
259259
e,
260260
projectiles,
@@ -327,4 +327,4 @@ export default {
327327
.roll-wrapper {
328328
border-radius: 999px;
329329
}
330-
</style>
330+
</style>

src/components/combat/entities/Card/CardActions.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export default {
219219
},
220220
methods: {
221221
startRoll(e, projectiles, option, action_index, action, category) {
222-
if (this.targeted && this.targeted.length) {
222+
if (this.targeted?.length) {
223223
this.rollObject = {
224224
e,
225225
projectiles,
@@ -248,7 +248,7 @@ export default {
248248
action_index: this.rollObject.action_index,
249249
action: this.rollObject.action,
250250
category: this.rollObject.category,
251-
entity: this.current_actor,
251+
entity: this.entity,
252252
targets: assigned_projectiles || this.targeted,
253253
option: this.rollObject.option,
254254
});

src/mixins/HpManipulations.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,16 +320,16 @@ export const setHP = {
320320
}
321321
},
322322
addLog(type, crit, target, current, amount, over, config) {
323-
var d = new Date();
324-
var time = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
323+
const d = new Date();
324+
const time = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
325325

326326
if (localStorage.getItem(this.encounterId)) {
327327
this.log = JSON.parse(localStorage.getItem(this.encounterId));
328328
} else {
329329
this.log = [];
330330
}
331331

332-
var newLog = {
332+
const newLog = {
333333
round: this.encounter.round,
334334
turn: this.encounter.turn + 1,
335335
by: current.key,

0 commit comments

Comments
 (0)