• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mizchi / next-editor / 1409

pending completion
1409

Pull #349

circleci

web-flow
chore(deps): update babel monorepo
Pull Request #349: chore(deps): update babel monorepo

95 of 450 branches covered (21.11%)

Branch coverage included in aggregate %.

967 of 2058 relevant lines covered (46.99%)

1.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/ui/components/utils/GlobalErrorBoundary.tsx
1
import React from "react"
×
2

3
export class GlobalErrorBoundary extends React.Component<
×
4
  {},
5
  { hasError: boolean; error: Error | null; info: any }
6
> {
7
  state = { hasError: false, error: null, info: null }
×
8
  componentDidCatch(error: Error, info: any) {
9
    // TODO: Resume by known bugs
10
    this.setState({ hasError: true, error, info })
×
11
    console.error(error, info)
×
12
  }
13
  render() {
14
    const { hasError, error, info } = this.state
×
15
    if (hasError && error && info) {
×
16
      return (
×
17
        <div style={{ padding: 10 }}>
18
          <h1>NextEditor: Recorvery Mode</h1>
19
          <h2>Error: {(error as any).message}</h2>
20

21
          <button
22
            onClick={() => {
23
              window.location.reload()
×
24
            }}
25
          >
26
            Reload
27
          </button>
28

29
          <button
30
            onClick={() => {
31
              window.localStorage.clear()
×
32
              window.location.reload()
×
33
            }}
34
          >
35
            Reload with clear localStorage
36
          </button>
37
        </div>
38
      )
39
    } else {
40
      return this.props.children
×
41
    }
42
  }
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc