<commit_before>

lizMap.events.on({

    'lizmappopupdisplayed': function(){

        if( !('qgisServerPlugins' in lizMap.config) )
            return;
        if( !('atlasprint' in lizMap.config.qgisServerPlugins) )
            return;
        if( !('printTemplates' in lizMap.config) || lizMap.config.printTemplates.length == 0)
            return;

        $('div.lizmapPopupDiv').each(function(){
            if($(this).find('a.lizmap-atlasprint-link').length != 0) {
                // Atlas print link already exist
                return true;
            }

            var getLayerId = $(this).find('input.lizmap-popup-layer-feature-id:first').val().split('.');
            var layerId = getLayerId[0];<commit_msg>[BUGFIX] Atlas print link error when no feature id found<commit_after>

lizMap.events.on({

    'lizmappopupdisplayed': function(){

        if( !('qgisServerPlugins' in lizMap.config) )
            return;
        if( !('atlasprint' in lizMap.config.qgisServerPlugins) )
            return;
        if( !('printTemplates' in lizMap.config) || lizMap.config.printTemplates.length == 0)
            return;

        $('div.lizmapPopupDiv').each(function(){
            if($(this).find('a.lizmap-atlasprint-link').length != 0) {
                // Atlas print link already exist
                return true;
            }
            if($(this).find('input.lizmap-popup-layer-feature-id').length == 0) {
                // The feature id is not found
                return true;
            }

            var getLayerId = $(this).find('input.lizmap-popup-layer-feature-id:first').val().split('.');
            var layerId = getLayerId[0];
{'fraction_non_alphanumeric': 0.14629741119807346, 'fraction_numerical': 0.004214328717639976, 'mean_word_length': 2.0273224043715845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6068222', 'n_tokens_mistral': 530, 'n_tokens_neox': 511, 'n_words': 92}