🐛 Fixed #446 and crash on closing file picker for raw request body without selecting a file
This commit is contained in:
parent
780bc55a96
commit
42e0200956
1 changed files with 13 additions and 6 deletions
|
|
@ -224,12 +224,19 @@
|
|||
<ul>
|
||||
<li>
|
||||
<label for="rawBody">{{ $t("raw_request_body") }}</label>
|
||||
<textarea
|
||||
id="rawBody"
|
||||
@keydown="formatRawParams"
|
||||
rows="8"
|
||||
<Editor
|
||||
v-model="rawParams"
|
||||
></textarea>
|
||||
:lang="'json'"
|
||||
@keydown="formatRawParams"
|
||||
:options="{
|
||||
maxLines: '16',
|
||||
minLines: '8',
|
||||
fontSize: '16px',
|
||||
autoScrollEditorIntoView: true,
|
||||
showPrintMargin: false,
|
||||
useWorker: false
|
||||
}"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -2160,7 +2167,7 @@ export default {
|
|||
uploadPayload() {
|
||||
this.rawInput = true;
|
||||
let file = this.$refs.payload.files[0];
|
||||
if (file !== null) {
|
||||
if (file !== undefined && file !== null) {
|
||||
let reader = new FileReader();
|
||||
reader.onload = e => {
|
||||
this.rawParams = e.target.result;
|
||||
|
|
|
|||
Loading…
Reference in a new issue