Skip to content

Commit

Permalink
fix .client.js (amd模式)中使用this变量时异常,this变量应该等于window
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhaolin committed Apr 23, 2024
1 parent e83c6d2 commit b56fbc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/init/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const loadClientScripts = async ()=>{

clientCodes = clientCodes + packageClientScripts;

WebAppInternals.additionalStaticJs["/steedos_dynamic_scripts.js"] = `$.getScript( Meteor.isCordova ? '${objectql.absoluteUrl("/steedos-init.js")}' : '/steedos-init.js', function(){${clientCodes}})`
WebAppInternals.additionalStaticJs["/steedos_dynamic_scripts.js"] = `$.getScript( Meteor.isCordova ? '${objectql.absoluteUrl("/steedos-init.js")}' : '/steedos-init.js', function(){${clientCodes}}.bind(window))`
}
} catch (error) {
// console.log(`loadClientScripts error: ${error}`);
Expand Down

0 comments on commit b56fbc3

Please sign in to comment.