syntax-prosody-ot / main

A webapp for the syntax-prosody analyst working in Optimality Theory, with automated Gen, Con and Eval. Download build files from syntax-prosody-ot/build
https://spot.sites.ucsc.edu/
GNU General Public License v2.0
12 stars 2 forks source link

Manual inputs bug on interface #581

Closed jbellik closed 3 years ago

jbellik commented 3 years ago

If you create only manual trees on the interface, SPOT fails silently when you click "Get results", with only an error in the console.

spot.js:6303 Uncaught TypeError: Cannot read property 'length' of undefined at checkForLongInputs (spot.js:6303) at HTMLFormElement.sendToTableau (spot.js:6348)

The problem seems to be that checkForLongInputs() is being run even when no automatically generated trees are present, and it is assuming that myGenInputs.sTrees is defined.

function checkForLongInputs(genOptions){ var safe_input_length = true; var safe_input_length_clitic = true; var sTree; var maxNumTerminals; var j = 0; while(safe_input_length && safe_input_length_clitic && j < myGenInputs.sTrees.length ...}

jbellik commented 3 years ago

I think this problem was introduced by the code creating a dropdown for when inputs are present in both the manual and automatic tabs.