Skip to content
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

Update plugin to support multiple plugins in the same project #41

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,15 @@ export class FirebaseAnalyticsWeb extends WebPlugin
document.getElementById(scripts[0]) &&
document.getElementById(scripts[1])
) {
return resolve();
return resolve( null );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of passing a value where none is expected, can you modify the promise to declare a type, e.g.:

return new Promise<void>(async (resolve, _reject) => {

}

await this.loadScript(firebaseAppScript.key, firebaseAppScript.src);
await this.loadScript(
firebaseAnalyticsScript.key,
firebaseAnalyticsScript.src
);
resolve();
resolve( null );
});
}

Expand Down