You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/07/14 01:43:07 UTC
[5/7] git commit: split is a String method,
not an Underscore method Use a falsey check (rather than explicit
null) to see if subscriber list exists
split is a String method, not an Underscore method
Use a falsey check (rather than explicit null) to see if subscriber list exists
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/d6f205ff
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/d6f205ff
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/d6f205ff
Branch: refs/heads/5.4-js-rewrite
Commit: d6f205ff46ddcb19ab9f0b5218be7b544c16d768
Parents: 0773b41
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Jul 13 15:59:07 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Jul 13 15:59:07 2012 -0700
----------------------------------------------------------------------
.../tapestry5/corelib/modulejs/pubsub.coffee | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6f205ff/tapestry-core/src/main/coffeescript/org/apache/tapestry5/corelib/modulejs/pubsub.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/org/apache/tapestry5/corelib/modulejs/pubsub.coffee b/tapestry-core/src/main/coffeescript/org/apache/tapestry5/corelib/modulejs/pubsub.coffee
index 42b98bb..250dc21 100644
--- a/tapestry-core/src/main/coffeescript/org/apache/tapestry5/corelib/modulejs/pubsub.coffee
+++ b/tapestry-core/src/main/coffeescript/org/apache/tapestry5/corelib/modulejs/pubsub.coffee
@@ -38,7 +38,7 @@ define ["_"], (_) ->
return
addSub = (stimulusName, addFirst, responder) ->
- [simpleName, namespaces...] = _.split stimulusName, '.'
+ [simpleName, namespaces...] = stimulusName.split '.'
subscriber =
stimulus: simpleName
@@ -47,7 +47,7 @@ define ["_"], (_) ->
list = subscribers[simpleName]
- if list is null
+ if not list
subscribers[simpleName] = [subscriber]
else
# If iterating the list (during a publish), then do a copy-on-write.
@@ -103,7 +103,7 @@ define ["_"], (_) ->
responder = stimulusName
stimulusName = ""
- [simpleName, namespaces...] = _.split stimulusName, '.'
+ [simpleName, namespaces...] = stimulusName.split '.'
if simpleName isnt ""
kullSubs simpleName, namespaces, responder
@@ -124,7 +124,7 @@ define ["_"], (_) ->
exports.fire = (stimulusName, memo, context) ->
list = subscribers[stimulusName]
- return exports if list is null
+ return exports if not list
event =
running: true