Skip to content

Commit

Permalink
Add a fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Jul 5, 2019
1 parent ea6f713 commit 5bf8fd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/content-script.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { GetContext } from '@holoflows/kit/es'
import { uiSetup } from './setup'
if (process.env.NODE_ENV === 'development') {
require('react-devtools')
try {
require('react-devtools')
} catch {}
}
if (GetContext() === 'content') {
uiSetup()
Expand Down
1 change: 1 addition & 0 deletions src/extension/content-script/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export async function pasteIntoPostBox(text: string, warningText: string) {
if (isMobile) {
const e = document.querySelector<HTMLDivElement>('.mentions-placeholder')
if (e) e.style.display = 'none'
copyFailed()
} else {
// Prevent Custom Paste failed, this will cause service not available to user.
if (element.innerText.indexOf(text) === -1) {
Expand Down

0 comments on commit 5bf8fd7

Please sign in to comment.