Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
magic authored and magic committed Sep 14, 2024
1 parent 4820b22 commit bbed6e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ Bmob.initialize("你的Application ID", "你的REST API Key");

https://bmob.github.io/hydrogen-js-sdk/#/?id=登陆


#### 版本 v2.6.0 2024年09月14日10:42:04
> - 修复vue3的兼容问题
#### 版本 v2.5.30
> - 增加支持微信文字检测违规2.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hydrogen-js-sdk",
"version": "2.5.30",
"version": "2.6.0",
"description": "本SDK基于es6开发,致力打造基于前端混合开发需求,支持微信小程序、H5、快应用、游戏Cocos、混合App等平台, 整个SDK,就dist目录下Bmob.*.js 这个文件即可使用全部功能,请使用最新版本。",
"main": "./index.js",
"typings": "./index.d.ts",
Expand Down
10 changes: 7 additions & 3 deletions src/lib/bmob.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
const utils = require('./utils')

if (typeof global==='undefined'){
global=window
let env
if (utils.getAppType() === 'h5') {
env = window
}
const Bmob = global.Bmob || {}
if (utils.getAppType() === 'nodejs') {
env = global
}
const Bmob = env.Bmob || {}
Bmob.utils = utils
Bmob._config = utils.getConfig()

Expand Down

0 comments on commit bbed6e5

Please sign in to comment.