Content-Length: 279760 | pFad | https://github.com/NativeScript/NativeScript/commit/f2bdff2a1cf167286ba1fa16f4c15bac4b83bc3c

3C Use undefined instead of delete for performance · NativeScript/NativeScript@f2bdff2 · GitHub
Skip to content

Commit f2bdff2

Browse files
committed
Use undefined instead of delete for performance
1 parent ab734b6 commit f2bdff2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/image-asset/image-asset-common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function getRequestedImageSize(src: { width: number; height: number }, op
5555
optionsCopy.width = parsedWidth;
5656
} else {
5757
console.warn('Invalid width value provided: ', optionsCopy.width);
58-
delete optionsCopy.width;
58+
optionsCopy.width = undefined;
5959
}
6060
}
6161

@@ -65,7 +65,7 @@ export function getRequestedImageSize(src: { width: number; height: number }, op
6565
optionsCopy.height = parsedHeight;
6666
} else {
6767
console.warn('Invalid height value provided: ', optionsCopy.height);
68-
delete optionsCopy.height;
68+
optionsCopy.height = undefined;
6969
}
7070
}
7171

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/NativeScript/NativeScript/commit/f2bdff2a1cf167286ba1fa16f4c15bac4b83bc3c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy