Skip to content

Commit

Permalink
changed firstString.length to firstString.raw.length (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
billymoroney1 authored Jan 18, 2022
1 parent 6e63a46 commit f65ad56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default function chalkTemplate(firstString, ...arguments_) {

const parts = [firstString.raw[0]];

for (let index = 1; index < firstString.length; index++) {
for (let index = 1; index < firstString.raw.length; index++) {
parts.push(
String(arguments_[index - 1]).replace(/[{}\\]/g, '\\$&'),
String(firstString.raw[index]),
Expand Down

0 comments on commit f65ad56

Please sign in to comment.