I have a VisualForce page with a script to dynamically display a lightning:clickToDial component. However, when the page is loaded I receive the following error message:

This page has an error. You might just need to refresh it. afterRender threw an error in 'lightning:clickToDial' [a.replace is not a function] Failing descriptor: {lightning:clickToDial}

Screenshot: enter image description here

VisualForce Page:

<apex:includeLightning />
        $Lightning.use("c:ClickToDialApp", function() {
          { phone : 11231231234},
          function(cmp) {
            // do some stuff

<div id="lightning" /> 

Lightning Component:

    <aura:attribute name="phone" type="Integer"/>
    TESTING: <lightning:clickToDial value="{!v.phone}"/>

Lightning Dependency App:

<aura:application access="GLOBAL" extends="ltng:outApp">
    <aura:dependency resource="c:ClickToDial"/>

Any information on what might be causing this error would be useful.

1 Answer 1


The Lightning component parameter value required quotes:

{ phone : "11231231234"}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .