mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add no-ops for Meteor.publish, methods, and onConnection if no webapp
This commit is contained in:
committed by
David Glasser
parent
074087be8a
commit
eeb95efaed
7
packages/ddp/server_convenience.js
Normal file → Executable file
7
packages/ddp/server_convenience.js
Normal file → Executable file
@@ -24,6 +24,13 @@ if (Package.webapp) {
|
||||
Meteor.server = null;
|
||||
Meteor.refresh = function (notification) {
|
||||
};
|
||||
|
||||
// Make these empty/no-ops too, so that non-webapp apps can still
|
||||
// depend on/use packages that use those functions.
|
||||
_.each(['publish', 'methods', 'onConnection'],
|
||||
function (name) {
|
||||
Meteor[name] = function () { };
|
||||
});
|
||||
}
|
||||
|
||||
// Meteor.server used to be called Meteor.default_server. Provide
|
||||
|
||||
Reference in New Issue
Block a user