Skip to content
This repository was archived by the owner on Nov 28, 2018. It is now read-only.

Commit 3cfe13d

Browse files
committed
Merge pull request #40 from nicksellen/master
fix check for missing subscription
2 parents 98f04fb + 21bbfde commit 3cfe13d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/stomp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Stomp.prototype.is_a_message = function(this_frame) {
295295
//
296296
Stomp.prototype.should_run_message_callback = function(this_frame) {
297297
var subscription = this._subscribed_to[this_frame.headers.destination];
298-
if (this_frame.headers.destination !== null && subscription !== null) {
298+
if (this_frame.headers.destination !== null && subscription) {
299299
if (subscription.enabled && subscription.callback !== null && typeof(subscription.callback) == 'function') {
300300
subscription.callback(this_frame.body, this_frame.headers);
301301
}

0 commit comments

Comments
 (0)