Jemt / Fit.UI

Fit.UI is a JavaScript based UI framework built on Object Oriented principles
http://fitui.org
GNU Lesser General Public License v3.0
19 stars 7 forks source link

Variable "elm" is used before it has been defined #198

Closed kollster closed 4 months ago

kollster commented 4 months ago

I get the following error when trying to use fit-ui:

Fit.UI.js:23754 
 Uncaught (in promise) ReferenceError: elm is not defined
    at Fit.Controls.Input.Focused (Fit.UI.js:23754:3)
    at Fit.Controls.Input.MultiLine (Fit.UI.js:24426:22)
    at Fit.Controls.Input.DesignMode (Fit.UI.js:25058:9)
    at control-factory.ts:2726:7
    at control-factory.ts:2734:1

It appears that a value is being assigned to elm before it has been defined. It happens on line 23754 in Fit.UI.js.

elm = input;

It works, if you change the line to:

let elm = input;

Below is an excerpt of the problematic area:

image

FlowIT-JIT commented 4 months ago

Thanks for the fix - it has now been merged and a new NPM package has been released: version 2.17.3