Skip to content

Commit

Permalink
Merge pull request #187 from InhiblabCore/dev
Browse files Browse the repository at this point in the history
perf: isSupport above deps watch
  • Loading branch information
NelsonYong authored Mar 9, 2024
2 parents 8da6a65 + 7616471 commit f607ed0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-hooks-plus",
"version": "1.8.8",
"version": "1.8.9",
"description": "Vue hooks library",
"files": [
"dist",
Expand Down
5 changes: 2 additions & 3 deletions packages/hooks/src/useResizeObserver/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type ResizeObserverCallback = (

export interface UseResizeObserverOptions {
/**
* The box the observer is observing changes to.
* The box the observer is observing changes to.
* The default is content-box.
*
* @default 'content-box'
Expand All @@ -28,7 +28,7 @@ export default function useResizeObserver(
options?: UseResizeObserverOptions,
): UseResizeObserverReturnType {
const { box = 'content-box', ...argsOptions } = options ?? {}
const isSupported = ref('ResizeObserver' in window)
const isSupported = ref(window && 'ResizeObserver' in window)
let ob: ResizeObserver | null
const modelTargets = computed(() =>
Array.isArray(target) ? target.map(curr => getTargetElement(curr)) : [getTargetElement(target)],
Expand Down Expand Up @@ -61,7 +61,6 @@ export default function useResizeObserver(
{
flush: 'post',
immediate: true,
deep: true,
},
)

Expand Down

0 comments on commit f607ed0

Please sign in to comment.