Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Ensure explicit targets always override browsers key targets #346

Merged
merged 1 commit into from
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/targets-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,7 @@ const getTargets = (targets = {}) => {
const [parsedTarget, parsedValue] = parser(target, value);

if (parsedValue) {
// Merge (lowest wins)
if (typeof parsedValue === "string") {
results.targets[parsedTarget] = semverMin(
results.targets[parsedTarget],
parsedValue,
);
} else {
// We can remove this block if/when we replace Uglify target
// with top level option
results.targets[parsedTarget] = parsedValue;
}
results.targets[parsedTarget] = parsedValue;
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/targets-parser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("getTargets", () => {
}),
{
chrome: "49.0.0",
firefox: "51.0.0",
firefox: "55.0.0",
ie: "9.0.0",
safari: "9.0.0",
},
Expand Down