Skip to content

Commit

Permalink
Merge branch 'master' into #2531
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib authored Jul 18, 2024
2 parents fd28415 + 3bd1925 commit 032959a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: wget
uses: wei/wget@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issue-reply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- name: help wanted
if: github.event.label.name == 'help wanted'
uses: actions-cool/issues-helper@v1.2
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
issue-number: ${{ github.event.issue.number }}
Expand All @@ -23,7 +23,7 @@ jobs:
- name: 🤔 Need Reproduce
if: github.event.label.name == '🤔 Need Reproduce'
uses: actions-cool/issues-helper@v1.2
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
issue-number: ${{ github.event.issue.number }}
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/node-ci.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ jobs:
strategy:
matrix:
mode: ['normal', 'strict']
node-version: [14.x, 16.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> "$GITHUB_OUTPUT"
- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down
4 changes: 2 additions & 2 deletions packages/hooks/src/useControllableValue/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ function useControllableValue<T = any>(props: Props = {}, options: Options<T> =
} = options;

const value = props[valuePropName] as T;
const isControlled = props.hasOwnProperty(valuePropName);
const isControlled = Object.prototype.hasOwnProperty.call(props, valuePropName);

const initialValue = useMemo(() => {
if (isControlled) {
return value;
}
if (props.hasOwnProperty(defaultValuePropName)) {
if (Object.prototype.hasOwnProperty.call(props, defaultValuePropName)) {
return props[defaultValuePropName];
}
return defaultValue;
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useLongPress/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function useLongPress(
};

function getClientPosition(event: EventType) {
if (event instanceof TouchEvent) {
if ('TouchEvent' in window && event instanceof TouchEvent) {
return {
clientX: event.touches[0].clientX,
clientY: event.touches[0].clientY,
Expand Down

0 comments on commit 032959a

Please sign in to comment.