zhoupeng 2 vuotta sitten
vanhempi
commit
55324db405
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      reado-app/utils/jsencrypt.js

+ 3 - 0
reado-app/utils/jsencrypt.js

@@ -7,6 +7,9 @@ import {
 const publickey = getPubKey()
 
 export function encrypt(txt) {
+	if(!publickey){
+		return "";
+	}
 	const encryptor = new JSEncrypt()
 	// 设置公钥
 	encryptor.setPublicKey(publickey)