We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 522abdf commit 4bda6e4Copy full SHA for 4bda6e4
index.js
@@ -51,7 +51,14 @@ function ParseServer(args) {
51
}
52
if (args.cloud) {
53
addParseCloud();
54
- require(args.cloud);
+ if (typeof args.cloud === 'function') {
55
+ args.cloud(Parse)
56
+ } else if (typeof args.cloud === 'string') {
57
+ require(args.cloud);
58
+ } else {
59
+ throw "argument 'cloud' must either be a string or a function";
60
+ }
61
+
62
63
64
cache.apps[args.appId] = {
0 commit comments