Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/typewriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) ) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The currentToken && part should be making sure currentToken is truthy. I'm not sure what the existential operator is supposed to catch here.

timeout += delay;
}
});
Expand Down