Skip to content

Commit 0105339

Browse files
fix getSubscriptions
1 parent 607638c commit 0105339

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/pubsub/topic.js

+6
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,13 @@ Topic.prototype.delete = function(callback) {
190190
* }, function(err, subscriptions, nextQuery) {});
191191
*/
192192
Topic.prototype.getSubscriptions = function(query, callback) {
193+
if (util.is(query, 'function')) {
194+
callback = query;
195+
query = {};
196+
}
197+
193198
query.query = 'pubsub.googleapis.com/topic in (' + this.name + ')';
199+
194200
this.pubsub.getSubscriptions(query, callback);
195201
};
196202

0 commit comments

Comments
 (0)