Skip to content

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

Closed
@HThuren

Description

@HThuren

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions