File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
docs/react/your-first-app
versioned_docs/version-v7/react/your-first-app Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export function usePhotoGallery() {
5959 Preferences .set ({ key: PHOTO_STORAGE , value: JSON .stringify (newPhotos ) });
6060
6161 // Delete photo file from filesystem
62- const filename = photo .filepath .substr (photo .filepath .lastIndexOf (' /' ) + 1 );
62+ const filename = photo .filepath .slice (photo .filepath .lastIndexOf (' /' ) + 1 );
6363 await Filesystem .deleteFile ({
6464 path: filename ,
6565 directory: Directory .Data ,
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export function usePhotoGallery() {
5959 Preferences .set ({ key: PHOTO_STORAGE , value: JSON .stringify (newPhotos ) });
6060
6161 // Delete photo file from filesystem
62- const filename = photo .filepath .substr (photo .filepath .lastIndexOf (' /' ) + 1 );
62+ const filename = photo .filepath .slice (photo .filepath .lastIndexOf (' /' ) + 1 );
6363 await Filesystem .deleteFile ({
6464 path: filename ,
6565 directory: Directory .Data ,
You can’t perform that action at this time.
0 commit comments