Skip to content
Closed
Changes from 1 commit
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 lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ function REPLServer(prompt,
// Check to see if a REPL keyword was used. If it returns true,
// display next prompt and return.
if (trimmedCmd) {
if (trimmedCmd.charAt(0) === '.' && isNaN(parseFloat(trimmedCmd))) {
if (trimmedCmd.charAt(0) === '.' && trimmedCmd.charAt(1) != '.' && isNaN(parseFloat(trimmedCmd))) {
Copy link
Member

@TimothyGu TimothyGu Jul 25, 2017

Choose a reason for hiding this comment

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

Please use strict not equals, so trimmedCmd.charAt(1) !== '.'

const matches = trimmedCmd.match(/^\.([^\s]+)\s*(.*)$/);
const keyword = matches && matches[1];
const rest = matches && matches[2];
Expand Down