Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

fix(chore): fixes webpack-stream error with missing catch var declaration #2291

Closed

Conversation

claudiopro
Copy link
Contributor

Summary

Fixes an error thrown by webpack-stream with the missing catch var declaration

[16:12:34] '<anonymous>' errored after 8.42 s
[16:12:34] Error in plugin "webpack-stream"
Message:
    ./lib/setDraftEditorSelection.js
Module parse failed: Unexpected token (278:12)
You may need an appropriate loader to handle this file type.
|     try {
|       selection.addRange(range);
|     } catch {// ignore
|     }
|   } else {
 @ ./lib/DraftEditorLeaf.react.js 29:30-66
 @ ./lib/DraftEditorBlock.react.js
 @ ./lib/Draft.js
Details:
    domain: [object Object]
    domainThrown: true

Test Plan

yarn 

Build completes without errors

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claudiopro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@claudiopro merged this pull request in 4252469.

mmissey pushed a commit to mmissey/draft-js that referenced this pull request Mar 24, 2020
…tion (facebookarchive#2291)

Summary:
**Summary**

Fixes an error thrown by `webpack-stream` with the missing catch var declaration
```
[16:12:34] '<anonymous>' errored after 8.42 s
[16:12:34] Error in plugin "webpack-stream"
Message:
    ./lib/setDraftEditorSelection.js
Module parse failed: Unexpected token (278:12)
You may need an appropriate loader to handle this file type.
|     try {
|       selection.addRange(range);
|     } catch {// ignore
|     }
|   } else {
 @ ./lib/DraftEditorLeaf.react.js 29:30-66
 @ ./lib/DraftEditorBlock.react.js
 @ ./lib/Draft.js
Details:
    domain: [object Object]
    domainThrown: true

```

**Test Plan**
```
yarn
```
Build completes without errors
Pull Request resolved: facebookarchive#2291

Reviewed By: mrkev

Differential Revision: D19230824

Pulled By: claudiopro

fbshipit-source-id: 9fdc2ebbee654404458851f6fd14a367c33a23e4
vilemj-Viclick pushed a commit to kontent-ai/draft-js that referenced this pull request Jul 16, 2020
…tion (facebookarchive#2291)

Summary:
**Summary**

Fixes an error thrown by `webpack-stream` with the missing catch var declaration
```
[16:12:34] '<anonymous>' errored after 8.42 s
[16:12:34] Error in plugin "webpack-stream"
Message:
    ./lib/setDraftEditorSelection.js
Module parse failed: Unexpected token (278:12)
You may need an appropriate loader to handle this file type.
|     try {
|       selection.addRange(range);
|     } catch {// ignore
|     }
|   } else {
 @ ./lib/DraftEditorLeaf.react.js 29:30-66
 @ ./lib/DraftEditorBlock.react.js
 @ ./lib/Draft.js
Details:
    domain: [object Object]
    domainThrown: true

```

**Test Plan**
```
yarn
```
Build completes without errors
Pull Request resolved: facebookarchive#2291

Reviewed By: mrkev

Differential Revision: D19230824

Pulled By: claudiopro

fbshipit-source-id: 9fdc2ebbee654404458851f6fd14a367c33a23e4
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
…tion (#2291)

Summary:
**Summary**

Fixes an error thrown by `webpack-stream` with the missing catch var declaration
```
[16:12:34] '<anonymous>' errored after 8.42 s
[16:12:34] Error in plugin "webpack-stream"
Message:
    ./lib/setDraftEditorSelection.js
Module parse failed: Unexpected token (278:12)
You may need an appropriate loader to handle this file type.
|     try {
|       selection.addRange(range);
|     } catch {// ignore
|     }
|   } else {
 @ ./lib/DraftEditorLeaf.react.js 29:30-66
 @ ./lib/DraftEditorBlock.react.js
 @ ./lib/Draft.js
Details:
    domain: [object Object]
    domainThrown: true

```

**Test Plan**
```
yarn
```
Build completes without errors
Pull Request resolved: facebookarchive/draft-js#2291

Reviewed By: mrkev

Differential Revision: D19230824

Pulled By: claudiopro

fbshipit-source-id: 9fdc2ebbee654404458851f6fd14a367c33a23e4
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants