From af3eb2cc3815164378ca2c9d471c8fa735584121 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Fri, 7 Dec 2012 18:01:32 +0100 Subject: [PATCH] //small js fix --- js/admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/admin.js b/js/admin.js index 34f6186e2..9949dbfee 100644 --- a/js/admin.js +++ b/js/admin.js @@ -52,7 +52,7 @@ function str2url(str,encoding,ucfirst) function copy2friendlyURL() { - if (!$('#link_rewrite_' + id_language).val().length)//check if user didn't type anything in rewrite field, to prevent overwriting + if (!$('#link_rewrite_' + id_language).val().length || !id_product)//check if user didn't type anything in rewrite field, to prevent overwriting { $('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val().replace(/^[0-9]+\./, ''), 'UTF-8').replace('%', '')); if ($('#friendly-url'))