forked from GitHub/gf-core
minibar: fix bug introduced in previous update
It could case JavaScript error ReferenceError: initial_grammar is not defined
This commit is contained in:
@@ -38,12 +38,11 @@ function Input(server,translations,opts) { // Input object constructor
|
|||||||
if(options.random_button)
|
if(options.random_button)
|
||||||
buttons.appendChild(button("Random",bind(generate_random,t),"R"));
|
buttons.appendChild(button("Random",bind(generate_random,t),"R"));
|
||||||
|
|
||||||
with(options) {
|
var o=options;
|
||||||
if(initial_grammar && initial && initial.from && initial.input) {
|
if(o.initial_grammar && o.initial && o.initial.from && o.initial.input){
|
||||||
t.local=mi_local(initial_grammar)
|
t.local=mi_local(o.initial_grammar)
|
||||||
t.local.put("from",initial.from)
|
t.local.put("from",o.initial.from)
|
||||||
t.local.put("current",initial)
|
t.local.put("current",o.initial)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user