Skip to content

Commit

Permalink
fix vars in effect's name
Browse files Browse the repository at this point in the history
  • Loading branch information
averrin committed Jul 25, 2022
1 parent b7fa1c5 commit 3dd5507
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/modules/Sequencer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3dd5507

Please sign in to comment.