From 274c22e7a2a1e641a37ede498e19bcbd960cd25c Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Wed, 18 Dec 2019 12:44:52 -0500 Subject: [PATCH] Revert "DEV: Log deprecated FA 4.7 icon names in /logs" This reverts commit 2dd9727c118f41357e7646c7f2edd910b6e5fe9e. --- .../discourse-common/lib/icon-library.js.es6 | 6 ------ .../javascripts/discourse/lib/utilities.js.es6 | 13 +++++++------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 b/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 index 0125e96548..f0188fb2c5 100644 --- a/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 +++ b/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 @@ -1,5 +1,4 @@ import { h } from "virtual-dom"; -import { reportToLogster } from "discourse/lib/utilities"; import attributeHook from "discourse-common/lib/attribute-hook"; import deprecated from "discourse-common/lib/deprecated"; @@ -585,11 +584,6 @@ function warnIfDeprecated(oldId, newId) { deprecated( `Please replace all occurrences of "${oldId}"" with "${newId}". FontAwesome 4.7 icon names are now deprecated and will be removed in the next release.` ); - const errorData = { - message: `FA icon deprecation: replace "${oldId}"" with "${newId}".`, - stacktrace: Error().stack - }; - reportToLogster(errorData); } function handleIconId(icon) { diff --git a/app/assets/javascripts/discourse/lib/utilities.js.es6 b/app/assets/javascripts/discourse/lib/utilities.js.es6 index 9fd061cddb..ff43ee32a1 100644 --- a/app/assets/javascripts/discourse/lib/utilities.js.es6 +++ b/app/assets/javascripts/discourse/lib/utilities.js.es6 @@ -376,7 +376,12 @@ export function postRNWebviewMessage(prop, value) { } } -export function reportToLogster(data) { +function reportToLogster(name, error) { + const data = { + message: `${name} theme/component is throwing errors`, + stacktrace: error.stack + }; + Ember.$.ajax(`${Discourse.BaseUri}/logs/report_js_error`, { data, type: "POST", @@ -387,11 +392,7 @@ export function reportToLogster(data) { export function rescueThemeError(name, error, api) { /* eslint-disable-next-line no-console */ console.error(`"${name}" error:`, error); - const errorData = { - message: `${name} theme/component is throwing errors`, - stacktrace: error.stack - }; - reportToLogster(errorData); + reportToLogster(name, error); const currentUser = api.getCurrentUser(); if (!currentUser || !currentUser.admin) {