@canlooks/can-ui 0.0.124 → 0.0.125

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.
@@ -137,7 +137,10 @@ function useContainer(container, effectContainer, defaultContainer) {
137
137
  return prev || null;
138
138
  }, [container]);
139
139
  (0, react_1.useEffect)(() => {
140
- const _container = effectContainer || defaultContainer || document.body;
140
+ let _container = effectContainer || defaultContainer;
141
+ if (typeof _container === 'undefined') {
142
+ _container = document.body;
143
+ }
141
144
  if (_container) {
142
145
  const el = typeof _container === 'function' ? _container() : _container;
143
146
  setContainerEl(el);
@@ -210,7 +210,6 @@ function useResponsiveValue(prop, disabled = false) {
210
210
  }
211
211
  }
212
212
  }
213
- console.log(234, responsiveObj, maxBreakpoint, responsiveObj[maxBreakpoint]);
214
213
  return responsiveObj[maxBreakpoint];
215
214
  };
216
215
  const [value, setValue] = (0, hooks_1.useDerivedState)(fn, [breakpoints]);
@@ -122,7 +122,10 @@ export function useContainer(container, effectContainer, defaultContainer) {
122
122
  return prev || null;
123
123
  }, [container]);
124
124
  useEffect(() => {
125
- const _container = effectContainer || defaultContainer || document.body;
125
+ let _container = effectContainer || defaultContainer;
126
+ if (typeof _container === 'undefined') {
127
+ _container = document.body;
128
+ }
126
129
  if (_container) {
127
130
  const el = typeof _container === 'function' ? _container() : _container;
128
131
  setContainerEl(el);
@@ -194,7 +194,6 @@ export function useResponsiveValue(prop, disabled = false) {
194
194
  }
195
195
  }
196
196
  }
197
- console.log(234, responsiveObj, maxBreakpoint, responsiveObj[maxBreakpoint]);
198
197
  return responsiveObj[maxBreakpoint];
199
198
  };
200
199
  const [value, setValue] = useDerivedState(fn, [breakpoints]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canlooks/can-ui",
3
- "version": "0.0.124",
3
+ "version": "0.0.125",
4
4
  "author": "C.CanLiang <canlooks@gmail.com>",
5
5
  "description": "My ui framework",
6
6
  "license": "MIT",