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

Fix failure to load on mobile #140

Merged
merged 2 commits into from Oct 19, 2023
Merged

Fix failure to load on mobile #140

merged 2 commits into from Oct 19, 2023

Conversation

mirnovov
Copy link
Contributor

@mirnovov mirnovov commented Oct 19, 2023

Closes #138 (sorry about that 🤦‍♂️)

sqlite-tag-spawned imports a bunch of node modules in the global scope. To avoid this, bundle a modified version of sqlite-tag-spawned (similar to what is done with yarle) which only loads said modules on desktop.

@mirnovov
Copy link
Contributor Author

Btw, Platform.isMacOS is true on iOS as well. Is this intentional?

@lishid
Copy link
Collaborator

lishid commented Oct 19, 2023

Btw, Platform.isMacOS is true on iOS as well. Is this intentional?

Mostly; a lot of the behaviors between macOS and iOS are shared - things like the command modifier key (instead of ctrl), and plus iOS browsers "pretend" to be macOS. If you want to test for desktop mac then you'd want to check Platform.isDesktopApp as well.

src/main.ts Outdated
@@ -204,6 +204,7 @@ export default class ImporterPlugin extends Plugin {
authCallback: AuthCallback | undefined;

async onload() {
console.log('a');
Copy link
Collaborator

Choose a reason for hiding this comment

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

This was probably not intentional?

src/main.ts Outdated Show resolved Hide resolved
@lishid lishid merged commit 81e3fe3 into obsidianmd:master Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to enable obsidian importer plugin on obsidian mobile.
2 participants