Skip to content
Snippets Groups Projects
Commit d9579df2 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixes a bug with the previous bugfix

parent 45fbc182
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,8 @@ class StateHandler extends Component {
parse(overrides = {}) {
const options = {};
function split(str, sep, n) {
function splitWithLimit(str, sep, n) {
const out = [];
let lastIndex = 0;
let index;
......@@ -47,10 +48,9 @@ class StateHandler extends Component {
}
let query = [];
const words = this.state.match(/"[^"]+"|\S+/g);
const words = this.state.match(/\S+"[^"]+"|\S+/g);
words.forEach((word) => {
const parts = split(word, ":", 2);
console.log(parts);
const parts = splitWithLimit(word, ":", 2);
if ([
"sender",
"buffer",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment