Skip to content

Commit b59639b

Browse files
committed
docs(vue): use slice
1 parent 98c520d commit b59639b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/vue/your-first-app/7-live-reload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const usePhotoGallery = () => {
5454
photos.value = photos.value.filter((p) => p.filepath !== photo.filepath);
5555

5656
// Delete photo file from filesystem
57-
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
57+
const filename = photo.filepath.slice(photo.filepath.lastIndexOf('/') + 1);
5858
await Filesystem.deleteFile({
5959
path: filename,
6060
directory: Directory.Data,

versioned_docs/version-v7/vue/your-first-app/7-live-reload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const usePhotoGallery = () => {
5454
photos.value = photos.value.filter((p) => p.filepath !== photo.filepath);
5555

5656
// Delete photo file from filesystem
57-
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
57+
const filename = photo.filepath.slice(photo.filepath.lastIndexOf('/') + 1);
5858
await Filesystem.deleteFile({
5959
path: filename,
6060
directory: Directory.Data,

0 commit comments

Comments
 (0)