Skip to content

Commit e40452f

Browse files
committed
fix: prilepek: fx segment locally
1 parent 9c82b44 commit e40452f

File tree

1 file changed

+4
-4
lines changed
  • src/plugins/docusaurus-plugin-segment

1 file changed

+4
-4
lines changed

src/plugins/docusaurus-plugin-segment/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ module.exports = function (context, options) {
1111
},
1212

1313
injectHtmlTags() {
14+
if (process.env.NODE_ENV !== 'production' && !allowedInDev) {
15+
return {};
16+
}
17+
1418
if (!writeKey) {
1519
throw new Error(
1620
'You need to specify a Segment writeKey in the plugin options',
1721
);
1822
}
1923

20-
if (process.env.NODE_ENV !== 'production' && !allowedInDev) {
21-
return {};
22-
}
23-
2424
return {
2525
headTags: [
2626
{

0 commit comments

Comments
 (0)