Title: fix(android): handle width and height as strings in ImageAsset options by thearnabsaha · Pull Request #10728 · NativeScript/NativeScript · GitHub
Open Graph Title: fix(android): handle width and height as strings in ImageAsset options by thearnabsaha · Pull Request #10728 · NativeScript/NativeScript
X Title: fix(android): handle width and height as strings in ImageAsset options by thearnabsaha · Pull Request #10728 · NativeScript/NativeScript
Description: PR Checklist There is an issue for the bug/feature this PR is for: #10668 I have signed the CLA. All existing tests are passing. What is the current behavior? When ImageAsset.options.width and options.height are provided as strings (e.g., "300"), the Android implementation crashes. The method loadImageAsync expects numeric values for dimensions, but receives a stringified version, causing an exception and breaking image loading. What is the new behavior? Explicitly parses options.width and options.height using parseInt(). Prevents crashes when developers provide string values. Defaults to Screen.mainScreen.widthPixels and heightPixels when parsing fails. Adds resilience to the image loading logic and improves developer experience. Fixes #10668 Additional Notes This update resolves a breaking bug that affected multiple NativeScript users. Validated across devices with both numeric and string values. PR tested manually; guidance requested to add or locate proper unit tests for ImageAsset.
Open Graph Description: PR Checklist There is an issue for the bug/feature this PR is for: #10668 I have signed the CLA. All existing tests are passing. What is the current behavior? When ImageAsset.options.width an...
X Description: PR Checklist There is an issue for the bug/feature this PR is for: #10668 I have signed the CLA. All existing tests are passing. What is the current behavior? When ImageAsset.options.width an...
Opengraph URL: https://github.com/NativeScript/NativeScript/pull/10728
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:3a2dc937-b679-7eac-9e46-a04045706464 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E166:209B80:5BF5D:7CBDD:696E3A70 |
| html-safe-nonce | 3bf67ae8538e17c08d34250692fc6c953f118ee1718c93c27c3ef58087a4920f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTY2OjIwOUI4MDo1QkY1RDo3Q0JERDo2OTZFM0E3MCIsInZpc2l0b3JfaWQiOiIyNDU2MjIzNzU3NDc5MzI4MzY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 486509ae743adf9e66d1927a49b8927fecca7ef4e7af8ae4dfd672814f4dbc0c |
| hovercard-subject-tag | pull_request:2450664084 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/NativeScript/NativeScript/pull/10728/checks |
| twitter:image | https://avatars.githubusercontent.com/u/68840187?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/68840187?s=400&v=4 |
| og:image:alt | PR Checklist There is an issue for the bug/feature this PR is for: #10668 I have signed the CLA. All existing tests are passing. What is the current behavior? When ImageAsset.options.width an... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b39958d54b39d52b9fc890ff25687d2383a83e003512d4480499b2dbd046839f |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fba10be4ea34590240b2f4a625fc807362c2d5b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width