Skip to content

Commit

Permalink
fix: native resize append util (#1478)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuncaulubilge committed Nov 13, 2018
1 parent 293994a commit a70ab56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ exports[`5. no url in environment 1`] = `
<div>
<img
alt=""
src="not-valid&resize=1400"
src="not-valid?resize=1400"
/>
<div>
<div />
Expand Down
3 changes: 2 additions & 1 deletion packages/image/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export default (uriString, key, value) => {
}

if (typeof URL === "undefined") {
return `${uriString}&${key}=${value}`;
const separator = uriString.includes("?") ? "&" : "?";
return `${uriString}${separator}${key}=${value}`;
}

let url;
Expand Down

0 comments on commit a70ab56

Please sign in to comment.