Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read properties of undefined (reading 'locales') #618

Open
HThuren opened this issue Jan 28, 2024 · 0 comments
Open

Comments

@HThuren
Copy link
Contributor

HThuren commented Jan 28, 2024

@wenzhixin
When trying to use locale, I get the Uncaught TypeError: Cannot read properties of undefined (reading 'locales')

Do you have an idea to help this out ?

You find

    	import './jquery';
	import 'jquery-ui/dist/jquery-ui';
	import 'jquery-textcomplete';
	import 'jquery-touchswipe';
	import select2 from 'select2';
	select2(jQuery);
	import 'multiple-select';
	import 'multiple-select/dist/multiple-select-locale-all.js';
	import '../../libraries/jquery.nouislider.all.min.js';
	import '../../libraries/jquery.flightindicators.js';

where import of
import 'multiple-select/dist/multiple-select-locale-all.js'; give the typeerror.

Comment out import 'multiple-select/dist/multiple-select-locale-all.js'; remove the issue, but then no translation.

This won't help

    import multipleSelect from 'multiple-select';
    multipleSelect('destroy');

either this

import multipleSelect from 'multiple-select';
multipleSelect('init');
import 'multiple-select/dist/multiple-select-locale-all.js';

If you want, you can get the code at betaflight/betaflight-configurator#3756.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant