Skip to content

Commit

Permalink
Fix repeated setVersion() on project file
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Dec 10, 2020
1 parent 5117188 commit 8682d96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/project-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ module.exports = class ProjectFile extends AbstractFile {

[AbstractFile.setVersion] (version) {
if (this[kSource]) {
this[kSource] = this[kSource].replace(this[kNeedle], `<Version>${version}</Version>`)
const needle = this[kNeedle]
const replacement = `<Version>${version}</Version>`

this[kSource] = this[kSource].replace(needle, replacement)
this[kNeedle] = replacement
this[kVersion] = version
}
}
Expand Down

0 comments on commit 8682d96

Please sign in to comment.