@@ -59,11 +59,9 @@ |
||
59 | 59 | $nonRedirectsWithSameLocale->each(function($existingRecord){ |
60 | 60 | $existingRecord->delete(); |
61 | 61 | }); |
62 | - } |
|
63 | - elseif($nonRedirectsWithSameLocale->isEmpty()){ |
|
62 | + } elseif($nonRedirectsWithSameLocale->isEmpty()){ |
|
64 | 63 | $this->createRecord($locale, $slug); |
65 | - } |
|
66 | - else{ |
|
64 | + } else{ |
|
67 | 65 | // Only replace the existing records that differ from the current passed slugs |
68 | 66 | $nonRedirectsWithSameLocale->each(function($existingRecord) use($slug){ |
69 | 67 | if($existingRecord->slug != $slug){ |
@@ -64,7 +64,9 @@ |
||
64 | 64 | |
65 | 65 | foreach ($records as $record) { |
66 | 66 | |
67 | - if(!isset($fields['url-slugs.'.$record->locale])) continue; |
|
67 | + if(!isset($fields['url-slugs.'.$record->locale])) { |
|
68 | + continue; |
|
69 | + } |
|
68 | 70 | |
69 | 71 | $fields['url-slugs.'.$record->locale] |
70 | 72 | ->setUrlRecord($record) |