Editing do to add "state" API doc

This commit is contained in:
David Négrier 2021-07-08 11:46:30 +02:00
parent b1cb12861f
commit 52fd9067b8
5 changed files with 114 additions and 78 deletions

View file

@ -23,6 +23,13 @@ export const initVariables = (_variables: Map<string, unknown>): void => {
}
setVariableResolvers.subscribe((event) => {
const oldValue = variables.get(event.key);
// If we are setting the same value, no need to do anything.
if (oldValue === event.value) {
return;
}
variables.set(event.key, event.value);
const subject = variableSubscribers.get(event.key);
if (subject !== undefined) {