File tree 3 files changed +21
-5
lines changed
3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
* Please check the [ releases] ( https://github.com/cars10/elasticvue/releases ) page if you need version release dates.*
4
4
5
+ ## unreleased
6
+
7
+ * [ feat] : support ` _bulk ` api, fixes [ #39 ] [ f39 ]
8
+
9
+ [ f39 ] : https://github.com/cars10/elasticvue/issues/39
10
+
11
+
5
12
## 0.30.1
6
13
7
14
The only change in this release is a fix to the Dockerfile. The docker image should build again.
Original file line number Diff line number Diff line change 118
118
try {
119
119
JSON .parse (requestBody .value )
120
120
return true
121
- } catch (error) {
122
- return false
121
+ } catch (_error) {
122
+ try {
123
+ const possibleBulk = ` [${ requestBody .value .trim ().split (' \n ' ).join (' ,' )} ]`
124
+ JSON .parse (possibleBulk)
125
+ return true
126
+ } catch (_bulkError) {
127
+ return false
128
+ }
123
129
}
124
130
})
125
131
Original file line number Diff line number Diff line change 67
67
if (this .value === ' ' ) return true
68
68
if (typeof this .value === ' object' ) return true
69
69
try {
70
- ( JSON .parse (this .value ) )
70
+ JSON .parse (this .value )
71
71
return true
72
72
} catch (error) {
73
73
return false
123
123
methods: {
124
124
beautify () {
125
125
if (this .value ) {
126
- let newValue = this .stringifyJson (JSON .parse (this .editor .getValue ()))
127
- this .$emit (' input' , newValue)
126
+ try {
127
+ let newValue = this .stringifyJson (JSON .parse (this .editor .getValue ()))
128
+ this .$emit (' input' , newValue)
129
+ } catch (error) {
130
+ }
128
131
}
129
132
},
130
133
setReadOnly (value ) {
You can’t perform that action at this time.
0 commit comments