@lambo-design/shared 1.0.0-beta.194 → 1.0.0-beta.196

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": "@lambo-design/shared",
3
- "version": "1.0.0-beta.194",
3
+ "version": "1.0.0-beta.196",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -22,7 +22,7 @@ export function filterMicroPermissionList(microType, permissionList = []) {
22
22
  if (!microType) return permissionList
23
23
  return permissionList.filter((item) => {
24
24
  // ! user-manage-server permissionValue 才是编码
25
- const itemName = item?.permissionValue || ''
25
+ const itemName = (item && item.permissionValue) || ''
26
26
  return (
27
27
  itemName.startsWith(microType) || itemName.startsWith(`${config.routerBase}-${microType}`)
28
28
  )
package/utils/n-theme.js CHANGED
@@ -10,9 +10,9 @@ export function getDefaultTheme() {
10
10
  }
11
11
 
12
12
  export function doChangeTheme(theme) {
13
- const body = document.getElementsByTagName('body')?.[0]
13
+ const body = document.getElementsByTagName('body') && document.getElementsByTagName('body')[0]
14
14
  if (body) {
15
- let cls = body.className?.split(' ') || []
15
+ let cls = (body.className && body.className.split(' ')) || []
16
16
  const nowCls = cls.reduce((rlt, item) => ({ ...rlt, [item]: true }), {
17
17
  'ind-theme': true,
18
18
  'ind-default-theme': true,