Skip to content

Commit ccddca9

Browse files
author
pioner921227
committed
fix
1 parent b6c928a commit ccddca9

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

lefthook.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
pre-commit:
2-
parallel: true
3-
commands:
4-
lint:
5-
glob: "*.{js,ts,jsx,tsx}"
6-
run: npx eslint {staged_files}
7-
types:
8-
glob: "*.{js,ts, jsx, tsx}"
9-
run: npx tsc
10-
commit-msg:
11-
parallel: true
12-
commands:
13-
commitlint:
14-
run: npx commitlint --edit
1+
# pre-commit:
2+
# parallel: true
3+
# commands:
4+
# lint:
5+
# glob: "*.{js,ts,jsx,tsx}"
6+
# run: npx eslint {staged_files}
7+
# types:
8+
# glob: "*.{js,ts, jsx, tsx}"
9+
# run: npx tsc
10+
# commit-msg:
11+
# parallel: true
12+
# commands:
13+
# commitlint:
14+
# run: npx commitlint --edit

src/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import { NativeModules } from 'react-native'
22

33

44
declare global {
5-
var saveImageToGallery: (buffer: ArrayBufferLike) => void
5+
var saveImageToGallery: (buffer: ArrayBufferLike) => void;
66
}
77

88

9-
let __saveImageToGallery = global.saveImageToGallery
9+
let __saveImageToGallery = global.saveImageToGallery;
1010

1111
if (!__saveImageToGallery) {
1212
if (NativeModules.ImgBufferSave?.install) {
13-
NativeModules.ImgBufferSave.install() // Вызываем native install метод
14-
__saveImageToGallery = global.saveImageToGallery // Сохраняем глобальную ссылку на объект SqlDb
15-
console.log('✅ react-native-img-buffer-save initialized successfully')
13+
NativeModules.ImgBufferSave.install(); // Вызываем native install метод
14+
__saveImageToGallery = global.saveImageToGallery; // Сохраняем глобальную ссылку на объект SqlDb
15+
console.log('✅ react-native-img-buffer-save initialized successfully');
1616
}
1717
}
1818
export const saveImageToGallery = (buff:ArrayBuffer | Uint8Array)=> {
@@ -23,5 +23,5 @@ export const saveImageToGallery = (buff:ArrayBuffer | Uint8Array)=> {
2323
} else {
2424
throw new Error('Invalid argument type; must be ArrayBuffer or Uint8Array');
2525
}
26-
}
26+
};
2727

0 commit comments

Comments
 (0)