You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Mobile: Plugins: Fix incorrect Node exports emulation (#10776)
This commit is contained in:
		| @@ -59,8 +59,8 @@ const useContentScripts = (pluginStates: PluginStates) => { | ||||
| 				if (event.cancelled) return; | ||||
|  | ||||
| 				const contentScriptModule = `(function () { | ||||
| 					const module = { exports: null }; | ||||
| 					const exports = {}; | ||||
| 					const module = { exports: exports }; | ||||
|  | ||||
| 					${content} | ||||
|  | ||||
|   | ||||
| @@ -82,7 +82,7 @@ export default class PluginLoader { | ||||
| 				scriptElement.appendChild(document.createTextNode(` | ||||
| 				(async () => { | ||||
| 					const exports = {}; | ||||
| 					const module = {}; | ||||
| 					const module = { exports: exports }; | ||||
| 					const require = window.__pluginLoaderRequireFunctions[${JSON.stringify(this.pluginLoaderId)}]; | ||||
| 					const joplin = { | ||||
| 						require, | ||||
| @@ -90,7 +90,7 @@ export default class PluginLoader { | ||||
| 		 | ||||
| 					${js}; | ||||
| 		 | ||||
| 					window.__pluginLoaderScriptLoadCallbacks[${JSON.stringify(scriptId)}](module.exports || exports); | ||||
| 					window.__pluginLoaderScriptLoadCallbacks[${JSON.stringify(scriptId)}](module.exports); | ||||
| 				})(); | ||||
| 				`)); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user