buddycloud/buddycloud-server — pull request #44 by Schnouki (2012-03-07 13:59:05+00:00)
Title: Fix undefined variable when paging backwards in RSM

A query with `post_idfirst_loaded_comment_id` made my server crash with the following traceback:

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
ReferenceError: count is not defined
at RSM.cropResults (/opt/buddycloud-server-git/lib/xmpp/rsm.js:46:27)
at /opt/buddycloud-server-git/lib/local/operations.js:876:19
at /opt/buddycloud-server-git/lib/local/model_postgres.js:589:18
at /opt/buddycloud-server-git/node_modules/async/lib/async.js:517:34
at Array.1 (/opt/buddycloud-server-git/node_modules/async/lib/async.js:441:34)
at EventEmitter._tickCallback (node.js:192:40)

Changing `count` to `this.count` in the JS code fixed it, and apparently this produces the same result.