gm-util 5.12.8 → 5.12.10-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-util",
3
- "version": "5.12.8",
3
+ "version": "5.12.10-beta.1",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/isZoom2.js CHANGED
@@ -110,7 +110,8 @@ export default function isZoom2() {
110
110
  }
111
111
 
112
112
  function detectZoom() {
113
- return detectZoomFunc[getBrowser() || "chrome"]();
113
+ if (!getBrowser()) return false;
114
+ return detectZoomFunc[getBrowser()]();
114
115
  }
115
116
 
116
117
  function iszoom(e) {
package/src/pinyin.js CHANGED
@@ -703,8 +703,9 @@ const pinyin = (source, style) => {
703
703
  if (compareResult < 0) {
704
704
  index--
705
705
  }
706
- cache[target] = pinyins[index]
707
- return (style === 'first_letter') ? pinyins[index].charAt(0) : pinyins[index]
706
+ const targetPinyin = pinyins[index] || ''
707
+ cache[target] = targetPinyin
708
+ return (style === 'first_letter') ? targetPinyin.charAt(0) : targetPinyin
708
709
  }
709
710
 
710
711
  const _pinyin = (source, style) => {