Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 9adcd8d

Browse files
author
Christopher Porter
committed
Replace !== with ? (the coffeescript null check)
!== causes compilation problems with the most recent version of coffeescript and hubot Mon Dec 02 2013 16:04:50 GMT-0800 (PST)] ERROR Unable to load /src/hubot-scripts/src/scripts/polite: SyntaxError: unexpected = at Object.exports.throwSyntaxError (/src/hubot/node_modules/coffee-script/lib/coffee-script/helpers.js:197:13) at Object.parser.yy.parseError (/src/hubot/node_modules/coffee-script/lib/coffee-script/coffee-script.js:265:20) at Object.parse (/src/hubot/node_modules/coffee-script/lib/coffee-script/parser.js:537:22) at exports.compile.compile (/src/hubot/node_modules/coffee-script/lib/coffee-script/coffee-script.js:35:24) at Object.loadFile (/src/hubot/node_modules/coffee-script/lib/coffee-script/coffee-script.js:176:14) at Module.load (/src/hubot/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Robot.loadFile (/src/hubot/src/robot.coffee:181:9, <js>:133:11) at Robot.loadHubotScripts (/src/hubot/src/robot.coffee:208:7, <js>:166:28) at /src/hubot/bin/hubot:98:15, <js>:99:30 at fs.js:266:14 at Object.oncomplete (fs.js:107:15)
1 parent fffc3b6 commit 9adcd8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/polite.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ farewellResponses = [
4040
youTalkinToMe = (msg, robot) ->
4141
input = msg.message.text.toLowerCase()
4242
name = robot.name.toLowerCase()
43-
input.match(new RegExp('\\b' + name + '\\b', 'i')) !== null
43+
input.match(new RegExp('\\b' + name + '\\b', 'i'))?
4444

4545
module.exports = (robot) ->
4646
robot.hear /\b(thanks|thank you|cheers|nice one)\b/i, (msg) ->

0 commit comments

Comments
 (0)