diff --git a/components/typewriter.js b/components/typewriter.js index 1c290d8..4e94fdd 100644 --- a/components/typewriter.js +++ b/components/typewriter.js @@ -101,7 +101,7 @@ export default class TypeWriter extends Component { if (delayMap) { delayMap.forEach(({ at, delay }) => { - if (at === visibleChars || (currentToken && currentToken.match(at)) ) { + if (at === visibleChars || (currentToken && currentToken?.match(at)) ) { timeout += delay; } });