Skip to content

Commit

Permalink
fix(utils/as-tag): only considers arguments as coming from a template…
Browse files Browse the repository at this point in the history
… literal if their number matche
  • Loading branch information
rafamel committed Apr 26, 2019
1 parent 0a8e105 commit c494a08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/as-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ function asTag(literals: TemplateStringsArray, ...placeholders: any[]): string;
function asTag(...args: any[]): string {
let literals = args.shift();
if (!Array.isArray(literals)) literals = [literals || ''];
if (args.length !== literals.length - 1) args = [];

let str = '';
for (let i = 0; i < literals.length; i++) {
Expand Down

0 comments on commit c494a08

Please sign in to comment.