File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -213,12 +213,12 @@ const initializeSmartlingPlugin = async () => {
213213 pkg . name
214214 ) ;
215215
216- // Check if webhook URL needs updating
216+ // Check if webhook URL needs updating - update whenever the URL is different
217217 const currentWebhookUrl = existingModel . webhooks ?. [ 0 ] ?. url ;
218218 const newWebhookUrl = updatedTemplate . webhooks [ 0 ] . url ;
219219
220- if ( currentWebhookUrl && ! currentWebhookUrl . includes ( 'preferredVersion=v2' ) && newWebhookUrl . includes ( 'preferredVersion=v2' ) ) {
221- // Update the existing model with v2 webhook
220+ if ( currentWebhookUrl !== newWebhookUrl ) {
221+ // Update the existing model with new webhook configuration
222222 existingModel . webhooks = updatedTemplate . webhooks ;
223223 }
224224 }
You can’t perform that action at this time.
0 commit comments