From 3dd55077ff33c62e507176261886033c9f5aaa40 Mon Sep 17 00:00:00 2001 From: averrin Date: Mon, 25 Jul 2022 19:18:42 +0200 Subject: [PATCH] fix vars in effect's name --- CHANGELOG.md | 5 +++++ src/modules/Sequencer.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b316772..a471b25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d ## [Unreleased] +## [0.7.1](https://github.com/averrin/director/compare/0.7.0...0.7.1) + +Fixed: + * Using variables as effects name causes "@varname" during converting to code + ## [0.7.0](https://github.com/averrin/director/compare/0.6.1...0.7.0) Bad news: diff --git a/src/modules/Sequencer.js b/src/modules/Sequencer.js index 7c2e351..a381dcd 100644 --- a/src/modules/Sequencer.js +++ b/src/modules/Sequencer.js @@ -137,10 +137,10 @@ controlled.forEach(c => c.control());`; const args = section.args.map((a, i) => this.getCodeForVal("", a, section._spec?.args[i]?.type)[0]); let sectionName = section.type; if (section.type == "effect") { - const name = section.args[0] || `${this.title}-${i}`; + const name = args[0] || `${this.title}-${i}`; r += `\t.${section.type}()\n`; r += `\t\t.origin("${this.id}")\n`; - r += `\t\t.name("${name}")\n`; + r += `\t\t.name(${name})\n`; } else { if (section._spec && "toCode" in section._spec) { r += section._spec.toCode(args);