Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let any client request any static resource. #9965

Merged
merged 1 commit into from Jun 7, 2018

Conversation

benjamn
Copy link
Contributor

@benjamn benjamn commented Jun 7, 2018

Fixes #9953.

cc @glasser @morloy

@benjamn benjamn self-assigned this Jun 7, 2018
@benjamn benjamn added this to the Package Patches milestone Jun 7, 2018
const staticFiles = staticFilesByArch[arch];

// If staticFiles contains originalPath with the arch inferred above,
// use that information.
if (hasOwn.call(staticFiles, originalPath)) {
return staticFiles[originalPath];
return info = staticFiles[originalPath];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you simplify this by using .find instead of .some?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a little weird because we started with an array of archs, but we want to end up with either staticFiles[originalPath] or staticFiles[path], neither of which is a an arch from the original array.

Copy link
Contributor

@hwillson hwillson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea and looks good! 👍

@benjamn benjamn merged commit 0a33617 into devel Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants