mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-04-24 17:02:16 +00:00
Clean code warnings
* 'readPath' was used before it was defined. * Missing semicolon
This commit is contained in:
parent
49179464f6
commit
9d78b6910c
@ -53,9 +53,16 @@ function initEvent() {
|
||||
}
|
||||
}
|
||||
|
||||
function readPath() {
|
||||
let query = location.href.substring(location.href.indexOf('#') + 1);
|
||||
let path = decodeURIComponent(query);
|
||||
getJsonpathInput().value = path;
|
||||
forceClick(getReadBtn());
|
||||
}
|
||||
|
||||
function readPathParam() {
|
||||
if(location.href.indexOf('#') > -1) {
|
||||
readPath()
|
||||
readPath();
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,13 +74,6 @@ function forceClick(ctrl) {
|
||||
ctrl.dispatchEvent(event, true);
|
||||
}
|
||||
|
||||
function readPath() {
|
||||
let query = location.href.substring(location.href.indexOf('#') + 1);
|
||||
let path = decodeURIComponent(query);
|
||||
getJsonpathInput().value = path;
|
||||
forceClick(getReadBtn());
|
||||
}
|
||||
|
||||
window.onpopstate = readPath;
|
||||
|
||||
initData('data/example.json').then(initEvent).then(readPathParam);
|
||||
initData('data/example.json').then(initEvent).then(readPathParam);
|
||||
|
Loading…
x
Reference in New Issue
Block a user