修复JSSDK加载判断错误
This commit is contained in:
8
index.js
8
index.js
@@ -59,14 +59,16 @@ const wxSDK = (options = {}) => {
|
||||
}
|
||||
|
||||
// SDK 加载管理
|
||||
const scriptId = 'Pd_share'
|
||||
const scriptId = 'wxShare'
|
||||
let scriptTag = document.getElementById(scriptId)
|
||||
let loadTimeout
|
||||
|
||||
const cleanup = () => {
|
||||
clearTimeout(loadTimeout)
|
||||
scriptTag.onload = null
|
||||
scriptTag.onerror = null
|
||||
if (scriptTag) {
|
||||
scriptTag.onload = null
|
||||
scriptTag.onerror = null
|
||||
}
|
||||
}
|
||||
|
||||
const loadSDK = () => {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wxsdk-pure",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "微信分享 SDK 封装",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
Reference in New Issue
Block a user