Skip to content

Commit

Permalink
Merge pull request #91 from AdFabConnect/bug_duplicate
Browse files Browse the repository at this point in the history
fix: on duplicate with same name
  • Loading branch information
gregorybesson committed Dec 16, 2016
2 parents 2444bda + bcccc6a commit d9a26ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/cms/operations/duplicate.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const duplicate = function(oldPostUrl, template, newPath, name, req, isUpdate =

var pCreate = cmsOperations.create(template, newPath, name, req, json, (isUpdate) ? false : true)
pCreate.then((resSave) => {
if (isUpdate && oldPostUrl !== newPostUrl) {
if (isUpdate && oldPostUrl !== path.join('/', newPostUrl)) {
abeExtend.hooks.instance.trigger('beforeUpdate', json, oldPostUrl, template, newPath, name, req, isUpdate)
cmsOperations.remove.remove(oldPostUrl)
}
Expand Down

0 comments on commit d9a26ed

Please sign in to comment.