File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
WordPress/Classes/ViewRelated/Stats/Insights Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,12 @@ class StatsTotalInsightsCell: StatsBaseCell {
269269
270270 // Rebuilds guide view for accessibility only if guide view already exists
271271 private func rebuildGuideViewIfNeeded( ) {
272+ /// NSAttributedString initialized with HTML on the background crashes the app
273+ /// This method can be called when traitCollectionDidChange which can be triggered when app goes to background
274+ guard UIApplication . shared. applicationState != . background else {
275+ return
276+ }
277+
272278 if guideText != nil ,
273279 let statsSummaryType = statsSummaryType,
274280 let guideText = StatsTotalInsightsData . makeTotalInsightsGuideText ( lastPostInsight: lastPostInsight, statsSummaryType: statsSummaryType) {
You can’t perform that action at this time.
0 commit comments