diff --git a/react-packager/src/node-haste/lib/__tests__/getAssetDataFromName-test.js b/react-packager/src/node-haste/lib/__tests__/getAssetDataFromName-test.js index ff61c405..a1e6b8cc 100644 --- a/react-packager/src/node-haste/lib/__tests__/getAssetDataFromName-test.js +++ b/react-packager/src/node-haste/lib/__tests__/getAssetDataFromName-test.js @@ -62,6 +62,14 @@ describe('getAssetDataFromName', () => { name: 'c', platform: 'ios', }); + + expect(getAssetDataFromName('a/b /c.png')).toEqual({ + resolution: 1, + assetName: 'a/b /c.png', + type: 'png', + name: 'c', + platform: null, + }); }); describe('resolution extraction', () => { diff --git a/react-packager/src/node-haste/lib/getAssetDataFromName.js b/react-packager/src/node-haste/lib/getAssetDataFromName.js index d0c04afc..04051175 100644 --- a/react-packager/src/node-haste/lib/getAssetDataFromName.js +++ b/react-packager/src/node-haste/lib/getAssetDataFromName.js @@ -42,6 +42,7 @@ function getAssetDataFromName(filename, platforms) { } else { assetName = filename; } + assetName = decodeURIComponent(assetName); return { resolution: resolution,