Skip to content

Commit

Permalink
fix: on duplicate with same name
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Dec 16, 2016
1 parent f041a5b commit bcccc6a
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 bcccc6a

Please sign in to comment.