Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxfoo committed Apr 26, 2021
1 parent ed6e76f commit c76676e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dashboard/panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
});

document.getElementById('testBtn').addEventListener('click', e => {
test.value = document.getElementById('testInput').value;
test.value = { amount: document.getElementById('testInput').value, change: test.value.change + 1 };
});

document.getElementById('defaultBtn').addEventListener('click', e => {
Expand Down
6 changes: 3 additions & 3 deletions extension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function (nodecg) {
nodecg.Replicant('claim_id', { defaultValue: "Place claim id of your livestream here", persistent: true });
nodecg.Replicant('defaultTrigger', { defaultValue: "Alert1" });
nodecg.Replicant('triggers', { defaultValue: [{name: 'Alert1', amount: '', type: "greaterthan" }] });
nodecg.Replicant('test', { defaultValue: 0, persistent: false });
nodecg.Replicant('test', { defaultValue: { amount: 0, change: 0 }, persistent: false });

const claim_id = nodecg.Replicant('claim_id');
const defaultTrigger = nodecg.Replicant('defaultTrigger');
Expand Down Expand Up @@ -62,8 +62,8 @@ module.exports = function (nodecg) {

test.on('change', value => {
var alertName = defaultTrigger.value;
alertName = checkTriggers(value, alertName);
activateAlert(alertName, "Slyver Testallone", value);
alertName = checkTriggers(value.amount, alertName);
activateAlert(alertName, "Slyver Testallone", value.amount);
});

// Connection opened
Expand Down

0 comments on commit c76676e

Please sign in to comment.