Skip to content

fix adapter string config #3538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/ParseServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,12 @@ class ParseServer {
if (pushOptions.queueOptions) {
delete pushOptions.queueOptions;
}
var tmpAdapter=pushOptions.adapter;
if (pushOptions.adapter && typeof pushOptions.adapter === "string") {
delete pushOptions.adapter;
}
// Pass the push options too as it works with the default
const pushAdapter = loadAdapter(pushOptions && pushOptions.adapter, ParsePushAdapter, pushOptions);
const pushAdapter = loadAdapter(pushOptions && tmpAdapter, ParsePushAdapter, pushOptions);
// We pass the options and the base class for the adatper,
// Note that passing an instance would work too
const pushController = new PushController();
Expand Down