We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b7953a commit 55a5f9bCopy full SHA for 55a5f9b
1 file changed
src/components/API/API.jsx
@@ -6,6 +6,16 @@ class Function extends React.Component {
6
render() {
7
const since = this.props.since;
8
const children = this.props.children;
9
+
10
+ const isRunningInDevelopmentMode = process.env.NODE_ENV !== "production";
11
+ if (isRunningInDevelopmentMode) {
12
+ // Doesn't look like more context can easily be obtained, so let's leave it at that...
13
+ const where = location;
14
+ const what = `Missing property (since) for (Function) imported from ${where}`;
15
+ const message = `${what}`;
16
+ if (!since) throw new Error(message);
17
+ }
18
19
const sinceBlock = (since && (
20
<>
21
<span className={styles.sinceBlock}>Available since: {since}</span>
0 commit comments