Просмотр исходного кода

fix check for "delete component" message

Brian Gough 8 лет назад
Родитель
Сommit
7e526395fb
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/document-updater/app/coffee/DispatchManager.coffee

+ 1 - 1
services/document-updater/app/coffee/DispatchManager.coffee

@@ -27,7 +27,7 @@ module.exports = DispatchManager =
 							# log everything except OpRangeNotAvailable errors, these are normal
 							if error? 
 								# downgrade OpRangeNotAvailable and "Delete component" errors so they are not sent to sentry
-								logAsWarning = (error instanceof Errors.OpRangeNotAvailableError) || error.message?.match(/^Delete component/)
+								logAsWarning = (error instanceof Errors.OpRangeNotAvailableError) || ((typeof error is' string') && error.match(/^Delete component/))
 								if logAsWarning
 									logger.warn err: error, project_id: project_id, doc_id: doc_id, "error processing update"
 								else