extending the handlers/map/renderer using AMD i get an error as below

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rabii
    Active Community Member
    • Jun 2016
    • 1268

    extending the handlers/map/renderer using AMD i get an error as below

    Another issues, currently facing is when extending the handlers/map/renderer using AMD i get an error as below (I am using the ext-template with AMD)

    Uncaught (in promise) TypeError: Dep.extend is not a function

    Below my custom renderer

    PHP Code:
    define('plus-map:handlers/map/tomtom-map-renderer', ['handlers/map/renderer'], function (Dep) {
        
        return 
    Dep.extend({

            
    /**
             * @param {module:handlers/map/renderer~addressData} addressData
             */
            
    render: function (addressData) {
                if (
    'tomtom' in window && window.tomtom.map) {
                    
    // rest of my code
                
    }
            },
        });
    }); 
    Last edited by rabii; 03-04-2024, 03:07 PM.
    Rabii
    Web Dev
  • yuri
    Member
    • Mar 2014
    • 8696

    #2
    Because ES6 classes are not extended with the extend method. Dep.extend is a legacy. Use official javascript classes.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...