fix: wsInit() en fonction globale — contourne Alpine.data qui ne s'enregistrait pas
- wsInit() était enregistré via Alpine.data() dans alpine:init →
ne fonctionnait pas → toutes les variables undefined (ReferenceError)
- Changé en function wsInit() globale → x-data='wsInit()' appelle
la fonction directement, zéro enregistrement Alpine
- Supprimé les wrappers Alpine.data() et addEventListener('alpine:init')
- Braces vérifiés: 397/397 équilibrés
- window._wsData.set dans init() avant await (contexte menu)
This commit is contained in:
@@ -867,9 +867,8 @@
|
||||
</div><!-- /ws-split -->
|
||||
|
||||
<script>
|
||||
document.addEventListener('alpine:init', function() {
|
||||
Alpine.data('wsInit', function() {
|
||||
return {
|
||||
function wsInit() {
|
||||
return {
|
||||
tree:[],
|
||||
displayTree:[],
|
||||
breadcrumb: [],
|
||||
@@ -2391,7 +2390,6 @@ document.addEventListener('alpine:init', function() {
|
||||
|
||||
};
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user