Skip to content

Commit

Permalink
fix: react-markdown process is not defined (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
yehong-z authored Aug 16, 2023
1 parent cae1734 commit 1b1dd80
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/src/admin/AdminTopic.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import Zmage from "react-zmage";
import i18next from "i18next";
import * as Conf from "../Conf";

window.process = {cwd: () => ""};

class AdminTopic extends React.Component {
constructor(props) {
super(props);
Expand Down
1 change: 1 addition & 0 deletions web/src/main/FooterRenderBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "./NoMatch.css";
import i18next from "i18next";
import {Helmet} from "react-helmet";
import ReactMarkdown from "react-markdown";
window.process = {cwd: () => ""};

class NoMatch extends React.Component {
constructor(props) {
Expand Down
1 change: 1 addition & 0 deletions web/src/main/LatestReplyBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import i18next from "i18next";

const ReactMarkdown = require("react-markdown");
const pangu = require("pangu");
window.process = {cwd: () => ""};

class LatestReplyBox extends React.Component {
constructor(props) {
Expand Down
1 change: 1 addition & 0 deletions web/src/main/NewBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {Helmet} from "react-helmet";
require("codemirror/mode/markdown/markdown");

const ReactMarkdown = require("react-markdown");
window.process = {cwd: () => ""};

class NewBox extends React.Component {
constructor(props) {
Expand Down
1 change: 1 addition & 0 deletions web/src/main/NewNodeTopicBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import * as Conf from "../Conf";
require("codemirror/mode/markdown/markdown");

const ReactMarkdown = require("react-markdown");
window.process = {cwd: () => ""};

class NewNodeTopicBox extends React.Component {
constructor(props) {
Expand Down
2 changes: 2 additions & 0 deletions web/src/main/NodeBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import i18next from "i18next";
import * as Conf from "../Conf";
import {Helmet} from "react-helmet";

window.process = {cwd: () => ""};

class NodeBox extends React.Component {
constructor(props) {
super(props);
Expand Down
1 change: 1 addition & 0 deletions web/src/main/NotificationBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import i18next from "i18next";
import {Helmet} from "react-helmet";

const pangu = require("pangu");
window.process = {cwd: () => ""};

class NotificationBox extends React.Component {
constructor(props) {
Expand Down
1 change: 1 addition & 0 deletions web/src/main/ReplyBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import UserLink from "../UserLink";

// const pangu = require("pangu");
const maxReplyDepth = Setting.PcBrowser ? Conf.ReplyMaxDepth : Conf.ReplyMobileMaxDepth;
window.process = {cwd: () => ""};

class ReplyBox extends React.Component {
constructor(props) {
Expand Down
2 changes: 2 additions & 0 deletions web/src/main/SingleReplyBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import UserLink from "../UserLink";
import {Helmet} from "react-helmet";
import Zmage from "react-zmage";

window.process = {cwd: () => ""};

class SingleReplyBox extends React.Component {
constructor(props) {
super(props);
Expand Down
2 changes: 2 additions & 0 deletions web/src/main/TopicBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ require("codemirror/mode/markdown/markdown");
const ReactMarkdown = require("react-markdown");
const pangu = require("pangu");

window.process = {cwd: () => ""};

class TopicBox extends React.Component {
constructor(props) {
super(props);
Expand Down

0 comments on commit 1b1dd80

Please sign in to comment.