The Los Angeles County Department of Children and Family Services (the department) and minor, Marcus C., Jr. (the child), collectively appellants, challenge an order dismissing a juvenile dependency action after an adjudication hearing under Welfare and Institutions Code section 300.1
Appellants argue that there was no substantial evidence to support dismissal of the petition, and the juvenile court abused its discretion by refusing to amend the petition to conform to proof. We agree, reverse the order dismissing the petition, and return the matter for further proceedings.
FACTUAL AND PROCEDURAL HISTORY
The Dependency Petition
On December 10, 2015, the department filed a Juvenile Dependency Petition (the Petition) on behalf of the child, who was then two years old. The Petition alleged (a) that the child was at risk because his parents' (C.S. (Mother) and Marcus C., Sr. (Father)) substance abuse and failures to protect the child endangered the child's physical health and safety, which "plac[ed] the child at risk of serious physical harm, damage ..."; and (b) that the parents had created a "detrimental and endangering home environment" which "endanger[ed] the child's physical health, safety and well being and place[ed] the child at risk of serious physical harm and damage." The department sought a determination based on these allegations that the juvenile court exercise jurisdiction over the child pursuant to section 300. (§ 355, subd. (a).)
The Detention Report
The Detention Report filed with the Petition noted that the child had been detained on December 7, 2015. It set out the factual bases for that detention and the allegations of the Petition. These facts included the following: The family had had an earlier contact with the department in 2014. Allegations of general neglect against the parents had been made. The reporting party stated then that Mother and Father had been recently evicted from an apartment for nonpayment of rent and smoking marijuana all day, and that Mother left the child with the maternal grandmother for extended periods of time. (When located in 2014, the child was found healthy and happy.) Also, Mother had missed a scheduled drug test and then refused an additional test by explaining that she did not need to test because the child was living with Father in Washington at that time. When Father was interviewed by telephone in 2014, he denied he was then using any drugs. He explained that he was living with his parents and had a strong support system. The department closed the 2014 referral for "General Neglect" as inconclusive and due to the family relocating to the state of Washington.
The 2015 Petition was the result of a referral made on October 11 of that year. The referring party alleged that the child had suffered severe neglect by Father, including the child falling out of a second story window of the apartment in which the child was then living with Father. The child landed on some bushes which cushioned his fall. He had scratch marks on his forehead and chin but no other significant visible injuries. Father was asleep in the apartment when the child fell. A neighbor, *437who found the child and took him upstairs to the apartment to awaken Father, took the child and Father to the hospital where the child was admitted for observation. The incident was reported to the department; a doctor at the hospital informed the department's social worker that the child had not sustained any injuries but the doctor was concerned for the child's safety.
The hospital discharge summary included the following regarding the state of care for the child: "Of note, [the child] has been lost to follow up with his pediatrician and is behind in shots, he is also speech delayed on exam and based on history and should be evaluated by a specialist which can be arranged by a pediatrician. Family was given referral for local pediatricians and also information/teaching on child proofing their home."
The child's medical records also noted that the child "has not been seen by a pediatrician since infancy and he does have ... some behaviors concerning for an autism spectrum disorder." Mother advised hospital staff that she had difficulty getting the child to his primary care physician due to insurance issues. She told staff that the child has met his milestones but only has a vocabulary of 50 words and did not speak in sentences. The parents were instructed to follow up with a pediatrician in one to two days.
Father told the social worker who interviewed him at the hospital that he is from the state of Washington and moved to California two weeks prior to the incident to help Mother with their son while she opened a restaurant. Father admitted smoking marijuana while he was in Washington, but not since he had relocated to California. Father was willing to drug test. He stated he had been arrested twice for robbery.
Father explained that he had been very tired since he relocated to Los Angeles. He stated that on the date of the fall, the child had fallen asleep at around 6:30 p.m. on a mattress on the living room floor. Father fell asleep next to the mattress. Father did not hear the child get up, but was awakened when he heard someone banging on the apartment door. Father was in shock when he was told that the child had fallen from the window. A neighbor offered to take them to the hospital. Father was told that someone had called 911 but Father decided to go with the neighbor to the hospital so they could get there sooner. Father stated that he would make sure the windows and screens are secure.
The apartment manager later told a social worker that she would have the screen replaced and would give Father locks to go on the bottom of the windows.
Mr. Jones, the neighbor who took Father and the child to the hospital, reported that he was in the pool area of the apartment building when he saw an object fall from the upstairs window into the bushes. When Mr. Jones realized that the object was a child, he jumped the fence and went to assist. As Mr. Jones approached, the child got up and walked towards Mr. Jones. Mr. Jones immediately went to Father's apartment and knocked and kicked on the door until answered. Father appeared to just have awakened.
A downstairs neighbor, who did not observe the incident, on an earlier date had observed Father pinching the child. On other occasions this neighbor had seen Father smoking a cigarette while the child would run unattended in the driveway at a distance from Father. The neighbor had observed different men residing in the apartment. Father was the third man to live there.
The police report of the incident contained a statement from a neighbor who *438lived below the parents who said Father had recently allowed the child to run around and go into the driveway unattended. When the neighbor told him to watch the child, Father responded, "It's not my kid." The neighbor was concerned for the child because Mother had not recently been around. From what the neighbor observed, Father did not see the child as a priority. On the date of the fall, the neighbor heard a loud sound and realized a child had fallen out of the upstairs window. Father did not answer the door for almost eight minutes after the neighbor began knocking on the apartment door to alert him to the child's fall.
Father told police officers that he was the child's Father. Father stated that he fell asleep while the child was napping. Father thought the windows were shut because the air conditioner was on. This was the first time something like this had happened. Father denied pinching the child but said he does spank him "on the butt" to discipline him. Father said he did watch the child when they were outside. Father told the police officers that he smoked marijuana but not around the child and stated that he had not smoked marijuana for a couple of days prior to the fall.
When police officers went to the apartment, they also spoke to a neighbor, who estimated it took nine minutes from the time the neighbor had begun to knock on the apartment door for Father to open it. At the apartment, the officers observed the bushes, and noted that the distance between the window and the bushes was approximately 15 vertical feet. They also saw a high chair and a desk chair in front of the living room window, either of which the child could have climbed before falling out. The window locking mechanism was broken. The apartment had edible food. There was a broken marijuana pipe easily accessible to the child on the living room floor, which was unkempt. The bathroom had two open knives on the counter, within the child's reach. There was some type of smoking apparatus inside the sink. Father indicated that he used it to smoke marijuana and in order to conserve marijuana. Officers did not find any marijuana or any other drug in the apartment.
Mother told police officers that Father moved in two weeks prior to the incident to help her with the child and she trusted Father with the child, describing him as "protective" of the child. She noted that Father was a heavy sleeper. Mother denied smoking marijuana but said Father usually did so in the mornings. Mother and the child would go to the park or for a walk when he was smoking marijuana. (Mother had told the social worker she had no concerns about Father caring for the child and considered the incident an accident.) No criminal charges were filed.
The department advised the parents to make sure there were no objects near windows onto which the child could climb and to make sure the windows were safely locked. The parents were told to follow up with the child's medical appointments. The department stated that it would make unannounced visits. The parents were told they must submit to on demand drug tests.
On the afternoon of October 22, 2015, the social worker made an unannounced visit to the home. Mother was there, still in her pajamas. The social worker observed the residence to be disheveled, with dirty diapers on the carpeted floor in the living room, dirty clothes scattered around the home, along with dirty dishes. There was a six-pack of beer on the table. Mother stated that Father was working. Mother explained the home was dirty and she was still in her pajamas because she was stressed. Mother's plans to open a coffee shop had not worked out; she had lost $40,000, which her mother had given to her *439to open the coffee shop. The child appeared healthy and very active on this visit. The window was closed and had proper locks.
Mother reported that the child's medical records are in Washington, where the family had lived before coming to California. She reported that the child was up to date with his immunizations. Mother said that Father smokes marijuana but not in the child's presence. Mother denied using drugs and stated that she was willing to drug test on October 23, 2015. Mother indicated that she would ask Father to submit to a drug test on the same date. Neither parent submitted to the test then.
On November 4, 2015, the social worker received an e-mail about a child abuse hotline call concerning the child. The reporting party stated that neither parent worked and both parents smoked marijuana although they did not smoke in front of the child. The reporting party was concerned about the parents' ability to care for the child because the parents do not work; they have no source of income; they both smoke marijuana; and they do not have any insight about properly caring for the child.
The reporting party stated that the maternal grandmother had been paying the parents' rent and supporting them. The parents used the child as leverage against the maternal grandmother, who was no longer willing to pay their rent or support them. Mother had asked the maternal grandmother to take care of the child from Monday through Friday, with Father taking care of the child on the weekends. The maternal grandmother had asked Mother to relinquish custody of the child so the maternal grandmother could be the legal guardian or adopt him. Mother refused the maternal grandmother's request.
When interviewed, the maternal grandmother confirmed that she was no longer willing to pay rent for the parents, who had until the first of December 2015 to move out of the apartment. She stated that she did not believe Mother used drugs but did think Mother was depressed. According to the maternal grandmother, Mother's home is always messy. She was aware that Mother did not take good care of the child.
When the social worker went to the family home on November 6, 2015, no one answered the door. She spoke with the apartment manager, who confirmed that the parents had until December 2015 to move. The manager had heard from residents that, after the child fell, a tenant knocked on the door for up to 15 minutes before Father answered. The tenants said Father did not want an ambulance and said "I'm just babysitting." Another tenant had told the manager that a week before the incident, the child had been in the carport outside, where he was unsupervised.
On November 9, 2015, the social worker attempted to speak with Mother by telephone, was unsuccessful, and left a voicemail message. On November 20, 2015, the social worker went to the apartment and knocked at the door, but no one answered. The social worker called Father's cell phone number but heard a message that the phone was not in service. The social worker then spoke with Mother via cell phone. Mother stated that she was in the process of moving in with a friend and that the maternal grandmother was caring for the child. Mother reported that the child would be in the maternal grandmother's home where the social worker could see him the following Monday morning, November 23, 2015.
When the social worker arrived at the maternal grandmother's home on November 23, the maternal grandmother reported that Mother had taken the child the *440previous Friday. The maternal grandmother reported that Mother was working at a restaurant and a neighbor was caring for the child. The maternal grandmother reported that she and her daughter had a "strained relationship," and that she would continue to financially support her daughter if she would take good care of the child. Prior to the Friday that Mother took the child, the maternal grandmother had been taking care of him for a couple of weeks from Monday through Friday.
The social worker then spoke to Mother on the telephone. Mother reported that Father had picked up the child from Mother's new residence in Corona that morning and taken him to school (day care). Mother informed the social worker that she was scheduled to begin working in December 2015.
The social worker expressed concerns to Mother about the parents' failure to submit to their drug tests as she had instructed in October. Mother said that she did not have transportation to the testing site. The social worker also expressed concerns that the parents were under the influence of controlled substances while caring for the child and that the parents were being evasive about contacting the department. Mother became upset and defensive, stating that she was under a lot of stress with having the department being in her life and transitioning to a new residence.
The social worker spoke to Pamela Smith, to whose apartment Mother had relocated. She stated that she is Mother's friend and wanted to provide a stable home and help her with the child while Mother was at work. Ms. Smith reported that Father was not residing in her home. Ms. Smith agreed to take Mother to the drug testing site on the same date. (Mother did test; her results came back positive for cannabinoids at 74 nanograms per milliliter.)
The social worker went to the location of the child care facility and observed the child playing outside with other children and saw that the child appeared healthy and had no visible marks or bruises.
On November 24, 2015, the social worker visited Mother at the Smith residence, a three-bedroom apartment in Corona. Upon inquiry, Mother reported that the child had not been to the doctor even though the hospital had recommended a visit after his discharge following the fall. She said she had just recently received her son's Medi-Cal card. Mother also claimed that she received a telephone call from a healthcare provider who told Mother that it was not necessary to bring the child in for a follow-up visit. Mother complied with the social worker's request for Mother to schedule an appointment with the child's pediatrician for a physical examination and immunization update.
On December 2, 2015, Michelle Franco, who had lived directly below the parents in the apartment from which the child had fallen, reported that Father did not work, Mother was never home, and Father was the child's caretaker while they had lived at that location. She said that Father got "high" all day. Ms. Franco had complained to the apartment manager several times about the parents smoking marijuana in the apartment and stated it smelled like "weed" all the time. She saw Father pinch the child one day while the child was crying. She saw Father smoking a cigarette outside and not watching the child, who wandered near the driveway. When she took the child back to Father, he said, "Good looking out." Two weeks before the fall, when she asked him if he was the child's father, he said, "This is not my baby, I'm helping her co-parent." Also about that time, Ms. Franco had occasion to go to the apartment to return the family's puppy which had wandered away outside.
*441Father answered the door, holding the child. She said the apartment smelled like marijuana.
On December 3, 2015, the social worker spoke to the paternal grandmother, who lives in Washington. The paternal grandmother did not know the child had fallen from the window. She thought Father was a good father who had taken good care of the child when they lived in Washington. She said Mother was "rotten" at watching the child because Mother was always on the computer. Mother had asked the paternal grandmother to take the child when he was born. The paternal grandmother knew that Mother and Father smoked marijuana and reported that it was legal to do so in Washington.
Also on December 3, 2015, the social worker learned that Mother failed to show for the child's medical appointment, which had been made in the presence of the social worker when she last visited Mother.
When Father went to the department office on December 7, 2015, for an interview, he stated he regularly smokes marijuana. He stated, "If there is 5 days I smoke 4 days," also stating he smoked to relieve his anxiety. He denied smoking in the child's presence. Father said he missed the October 23, 2015 drug test because he had started a new job. Father acknowledged his error in having drug paraphernalia and knives within the child's reach in the apartment and said he knew the apartment was "atrocious" and "disgusting." Father did not take the child to the follow-up appointment after the child's hospitalization because he thought Mother was going to make an appointment. Father thought Mother loved the child but said she was always gone.
When interviewed at the department office, also on December 7, 2015, Mother told the social worker that, if the child was not returned to her, she wanted him to be placed with the paternal grandmother in Washington. Mother planned to move back to Washington because most of her family, including aunts and cousins, lived there.
At the hearing on the Petition on December 10, 2015, the juvenile court ordered the child detained from the parents (the child was first detained to Shelter Care; later he was placed with the maternal grandmother); the parents were allowed monitored visits. The department was ordered to refer the parents to interactive therapy with the child. The parents were ordered to test weekly and on demand for the presence of drugs.
The Jurisdiction/Disposition Report
On February 17, 2016, the department filed its Jurisdiction/Disposition Report. This report contained a restatement of the charging allegations of the original Petition, and repeated many of the facts and claims by and concerning Mother, Father, and the maternal grandmother in the original reports. It also set out new facts, including the following:
Mother denied abusing drugs. Mother tested positive for cannabis on November 23, 2015, and January 8, 2016; she also missed her tests on December 11, and 29, 2015, and January 22, 2016. She told a department interviewer that she had stopped using any drugs and had been working full time as a preparation cook in a restaurant. Mother said that her positive tests were because she is "big" and she was told marijuana stays in the body for a long time. Father had told her that the day the child fell out of the window Father had taken cold medicine. She said Father does smoke marijuana, but never around the child.
Father reported that as of January 2016, Father was working at a restaurant and *442living at a motel. (As of the date of the hearing, he was living in his car.) Father had started using marijuana after high school. He said he did not use marijuana when he was with the child. Father usually kept his knives (which the police had observed on the bathroom counter when they went to the apartment in their investigation of the fall) in a locked box, but forgot about the knives on the date of the incident. Father said he had not planned to work when he came to California, but because Mother got "scammed" about the coffee shop, they both had to work. Father said the neighbor had misunderstood Father to say that he was not the child's father.
The maternal grandmother told the department that the parents always blame other people; they do not clean up the home; they were not responsible; and they were very lazy. The maternal grandmother reported that the child had daily nightmares; he was physically aggressive and would bite and push her when he did not want to follow directions.
Interviewed by telephone as she lived in the state of Washington, the paternal grandmother said that Father never had problems with the child when they were in Washington. She reported that Mother had tried to leave the child with her when he was two weeks old, but the paternal grandmother had declined to take custody of the child. Father told her that the day the child fell from the window it was not his day to watch him and Father was very tired. The paternal grandmother reported that Mother always just dropped the child off with anyone who was available, stating that Mother "doesn't have the mother instinct."
The child did have a physical examination on January 5, 2016. The child was well, but it was noted that he was obese. The child was found to have speech delay. The Multidisciplinary Assessment Team Summary of Finding Report (MAT Report) noted that the child was not appropriately communicating verbally. The MAT Report noted that the child had been observed kicking the maternal grandmother after he refused to follow a directive. When interviewed by the MAT assessor, Mother had said she was worried about the child because he did not talk. Mother thought he was aggressive because he was frustrated about his difficulty with verbal expression. Mother said the child did not have bad behaviors or nightmares when he lived with her.
The Jurisdiction/Disposition Report dated March 2, 2016, also disclosed that, as of February 11, 2016, Father was homeless and living in a car. Father was not attending parenting classes or counseling programs and stated he wanted to return to Washington. Drug testing reports accompanying this document indicated that Father had tested negative for all substances on January 15 and 29 and February 10, 2016.
Based on the information received from all of the persons interviewed, the department stated its concerns about the parents' capacity to protect the child due to their lack of parenting skills appropriate for their young child and their lack of insight into the family's issues. The department observed that the family had initially come to the department's attention in October 2014, and noted that the parents had not addressed then the issues that had existed, and had moved back to Washington instead of participating in drug testing and parenting services. On this new investigation, the parents also were not participating in parenting services.
The department recommended that the juvenile court sustain the Petition and include orders for the parents to participate in parenting classes and in individual counseling *443to address child safety deficits, age-appropriate parenting skills and alcohol and drug abuse awareness issues. The department also recommended that the parents continue to be subject to random drug testing.
On March 2, 2016, in a Last Minute Information for the Court document, the department reported that the child's therapist had now scheduled Father for sessions with the child on Mondays. Mother was scheduled to participate in sessions with the child on Thursdays. The report also stated that Father had tested negative for substances on February 22, 2016, and Mother had tested negative for all substances on February 3, 2016. The department's recommendations in this report were the same as in the Jurisdiction/Disposition report: that the child not be returned to the parents at this time because of the child's young age, the parents' lack of participation in parenting classes and counseling programs to address child safety and age-appropriate parenting skills, and the continued need for them to address drug awareness issues "and other case issues."
The Jurisdiction/Disposition Hearing
The jurisdiction/disposition hearing began in the morning on March 2, 2016, and was continued to that afternoon as the dependency investigator (the DI) was unable to attend the morning session. In the morning session, the court reviewed the Last Minute Report, which contained information that the maternal grandmother had been arrested in 2009 on an assault charge resulting from a dispute with her then-husband while they were living in Washington, and described conditions inside her current residence, where the child had been staying without incident since mid-December 2015. This report identified some correctible conditions in the home (unsecured televisions, medication within reach of the child and limited sleeping arrangements).
The department lawyer asked that the court "work with the caretakers" until more information could be obtained from authorities in Washington about the incident which had led to the maternal grandmother's arrest many years before, and pointed out that the child had been living with the maternal grandmother since the prior December and this was the only indication of any issue with that arrangement. After first stating that it would consider the matter later in the proceedings that day, the court nevertheless vacated the order detaining the child with the grandmother.
In the afternoon session that day, the court began by admitting into evidence the Jurisdiction/Disposition Report with its attachments, including the Petition and the Last Minute Information Report. The court then heard the testimony of the DI. The court began the questioning of the DI with inquiries about the parents' use of marijuana and whether that was connected to the child's fall. The DI responded that the fall was a result of Father's inattention, also testifying that both parents were now testing clean and there was no information that either parent was under the influence of marijuana when the child fell. The DI also testified that the parents lacked awareness of child safety issues and had not attended the recommended child safety classes, which continued to place the child at risk. When the court asked the DI about visiting the home, the court was advised that the parents did not live together and the DI had not visited Father's home because he was living in a car. The DI had not visited the Mother's home (but another department employee had) and the DI did not know whether Mother had addressed any child safety concerns at that *444location, or whether placing the child there would expose the child to safety risks.
The DI was concerned for the safety of the child because of the parents' failure to participate in any parenting and counseling classes, the parents had not kept up with the child's immunizations, and neither parent had taken the child to the post-fall doctor's appointment.
At the conclusion of the DI's testimony, counsel for the department and for the child asked the court to amend the Petition to conform to the proof presented at the hearing. The court declined to grant leave to amend, dismissed the Petition and released the child to the custody of his parents.
The court granted a stay of its decision until March 17, 2016, and ordered the child to remain in the maternal grandmother's home.
On March 10, 2016, the child's attorney filed a notice of appeal from the order dismissing the Petition. On March 15, 2016, counsel for the child filed a petition for writ of mandate or, alternatively, petition for writ of supersedeas. On the same date, we granted an immediate stay of the dismissal order. On March 16, 2016, the department joined in the child's writ petition. The parents opposed the writ petition.
On April 4, 2016, we granted a writ of supersedeas, staying the juvenile court's dismissal order and releasing the child to the parents' custody pending the determination of the appeal. The department filed a notice of appeal from the dismissal order on April 7, 2016.
CONTENTIONS
In their separate appeals, counsel for the child and for the department raise similar contentions. We state the contentions as phrased by the department: (1) there was no substantial evidence to support the juvenile court's dismissal of the Petition, and (2) the juvenile court abused its discretion by refusing to amend the Petition to conform to proof in lieu of dismissing the Petition outright.
DISCUSSION
We first set out the standard by which we review the juvenile court's jurisdictional determination, followed by the standard of review for its determination to deny leave to amend. In our analysis, we determine that the juvenile court erred in denying appellants' motions to amend the Petition to conform to proof, and return the matter to the juvenile court for reconsideration once the petition is amended.
I. Standard of review for the jurisdictional determination
While the petitioner in a dependency proceeding must establish the juvenile court's jurisdiction over the child by a preponderance of the evidence (§ 355), " '[i]n reviewing a challenge to the sufficiency of the evidence supporting the jurisdictional findings and disposition, we determine if substantial evidence, contradicted or uncontradicted, supports them. "In making this determination, we draw all reasonable inferences from the evidence to support the findings and orders of the dependency court; we review the record in the light most favorable to the court's determinations; and we note that issues of fact and credibility are the province of the trial court." [Citation.] "We do not reweigh the evidence or exercise independent judgment, but merely determine if there are sufficient facts to support the findings of the trial court. [Citations.] ' "[T]he [appellate] court must review the whole record in the light most favorable to the judgment below to determine whether it discloses substantial evidence ... such *445that a reasonable trier of fact could find [that the order is appropriate]." ' [Citations.]" ' " (In re I.J. (2013) 56 Cal.4th 766, 773, 156 Cal.Rptr.3d 297, 299 P.3d 1254.)2
Substantial evidence consists of evidence that is "reasonable, credible, and of solid value," which would allow a reasonable trier of fact to reach the conclusions that the trial court did reach in the case being reviewed. (In re Christina A. (1989) 213 Cal.App.3d 1073, 1080, 261 Cal.Rptr. 903.) While the standard of review is deferential (In re Luke M . (2003) 107 Cal.App.4th 1412, 1417, 132 Cal.Rptr.2d 907 ), "substantial evidence is not synonymous with any evidence" (In re Savannah M. (2005) 131 Cal.App.4th 1387, 1393, 32 Cal.Rptr.3d 526, original italics). This court reviews the entire record on appeal. (People v. Johnson (1980) 26 Cal.3d 557, 577, 162 Cal.Rptr. 431, 606 P.2d 738.) If there is a lack of substantial evidence to support the judgment, it is erroneous as a matter of law. (In re Sheila B . (1993) 19 Cal.App.4th 187, 199, fn. 6, 23 Cal.Rptr.2d 482.)
The primary purpose of dependency statutes is to protect children by safeguarding their physical and emotional well-being. (§ 300.2; In re Nolan W. (2009) 45 Cal.4th 1217, 1228, 91 Cal.Rptr.3d 140, 203 P.3d 454 ; T.W. v. Superior Court (2012) 203 Cal.App.4th 30, 42-43, 136 Cal.Rptr.3d 594.)
Section 300.2 states the legislative purpose of the statutory plan for adjudication under the dependency statutes: "Notwithstanding any other provision of law, the purpose of the provisions of this chapter relating to dependent children is to provide maximum safety and protection for children who are currently being physically, sexually, or emotionally abused, being neglected, or being exploited, and to ensure the safety, protection, and physical and emotional well-being of children who are at risk of that harm. This safety, protection, and physical and emotional well-being may include provision of a full array of social and health services to help the child and family and to prevent reabuse of children. The focus shall be on the preservation of the family as well as the safety, protection, and physical and emotional well-being of the child. The provision of a home environment free from the negative effects of substance abuse is a necessary condition for the safety, protection and physical and emotional well-being of the child. Successful participation in a treatment program for substance abuse may be considered in evaluating the home environment....."
Section 300 sets forth several circumstances under which a child comes within the jurisdiction of the juvenile court. The juvenile court may adjudicate a child to be a dependent under section 300, subdivision (b)(1) when "[t]he child has suffered, or there is a substantial risk that the child will suffer , serious physical harm or illness, as a result of the failure or inability of his or her parent or guardian to adequately supervise or protect the child, or the willful or negligent failure of the child's parent or guardian to adequately supervise or protect the child from the conduct of the custodian with whom the child has been left, or by the willful or negligent failure of the parent or guardian to provide *446the child with adequate food, clothing, shelter, or medical treatment, or by the inability of the parent or guardian to provide regular care for the child due to the parent's or guardian's mental illness, developmental disability, or substance abuse." (§ 300, italics added.)
Proof of three elements is required to establish jurisdiction under section 300 : " '(1) neglectful conduct by the parent in one of the specified forms; (2) causation; and (3) "serious physical harm or illness" to the [child], or a "substantial risk" of such harm or illness.' (In re Rocco M. [ (1991) ] 1 Cal.App.4th [814,] 820 [2 Cal.Rptr.2d 429].) The third element ... effectively requires a showing that at the time of the jurisdictional hearing the child is at substantial risk of serious physical harm in the future (e.g., evidence showing a substantial risk that past physical harm will reoccur). [Citations.]" (In re Savannah M. , supra , 131 Cal.App.4th at pp.1395-1396, 32 Cal.Rptr.3d 526, italics added.)
Jurisdiction may be exercised "based on a prior incident of harm or a current or future risk" of harm. (In re J.K. (2009) 174 Cal.App.4th 1426, 1435, fn. 5, 95 Cal.Rptr.3d 235.) A court may exercise jurisdiction when the parent has a history of substance abuse and the evidence shows that the substance abuse places a child of tender years at risk of harm from the parents' inability to provide regular care. (In re Christopher R. (2014) 225 Cal.App.4th 1210, 1216, 171 Cal.Rptr.3d 14.) "Although section 300 generally requires proof the child is subject to the defined risk of harm at the time of the jurisdiction hearing [citations], the court need not wait until a child is seriously abused or injured to assume jurisdiction and take steps necessary to protect the child [citation]." (Id . at pp. 1215-1216, 171 Cal.Rptr.3d 14.) In making this determination, the court may consider whether past events require the court's present protection if there is reason to believe that the parent will continue the conduct. (Id . at p. 1216, 171 Cal.Rptr.3d 14.) Thus, it is well-established that jurisdiction may be determined based on a showing either that the child has suffered, or there is a substantial risk the child in the future will suffer, serious physical harm or abuse. (In re Adam D. (2010) 183 Cal.App.4th 1250, 1261, 108 Cal.Rptr.3d 611.) Past conduct may be probative of current (and future) risk if there is reason to believe the conduct will continue. (In re Rocco M ., supra , 1 Cal.App.4th at p. 824, 2 Cal.Rptr.2d 429.)
II. Standard of review of motions to amend a petition
Section 348 provides that the provisions of the Code of Civil Procedure on variance and amendment of pleadings in civil actions apply in juvenile dependency proceedings and petitions. Under these statutes (see Code Civ. Proc., §§ 469 -470 ), a court may allow amendments to conform to proof so long as those amendments do not "mislead a party to his or her prejudice." (In re Andrew S. (2016) 2 Cal.App.5th 536, 544, fn. 4, 206 Cal.Rptr.3d 304.)
"Given the haste with which petitions are sometimes drafted ... the ability to amend according to proof plays an important role in the overall dependency scheme. If a variance between pleading and proof-to use the traditional term of art from the civil law [citation]- is so wide that it would, in effect, violate due process to allow the amendment, the court should, of course, refuse any such amendment. [¶] The basic rule from civil law, however, is that amendments to conform to proof are favored, and should not be denied unless the pleading as drafted prior to the proposed amendment would have misled the adversarial party to its prejudice. [Citation.]"
*447(In re Jessica C. (2001) 93 Cal.App.4th 1027, 1041-1042, 113 Cal.Rptr.2d 597.) We review the juvenile court's determination for abuse of discretion. (Trafton v. Youngblood (1968) 69 Cal.2d 17, 31, 69 Cal.Rptr. 568, 442 P.2d 648.) The fundamental inquiry is whether the proposed amendment would "mislead a party to his or her prejudice." (In re Andrew S., supra , 2 Cal.App.5th 536, 544, fn. 4, 206 Cal.Rptr.3d 304.)
III. Additional facts
At the jurisdictional hearing, all parties, including each parent, were represented by counsel. The court admitted into evidence without objection several extensive reports chronicling the parents'-and the child's-history, including the parents' contact with the department the year prior to the present contact (after which they left California for Washington), as well as reports of the circumstances of the child's fall from the second story window in October 2015, the parents' history and attitudes about use of marijuana, their failures to take the child to his post-fall medical appointment, their failures to take him to any physician in almost two years and to make sure he obtained his childhood immunizations, the absence of any treatment for his speech difficulties or potential autism spectrum disorder, Father's admissions concerning the unsafe conditions in the apartment, and the failures of the parents to follow the department's directive to enroll in child safety and parenting classes. These facts were clearly within the personal knowledge of each of the parents as they were facts concerning the parents' own actions and failures to act.
The evidence also included interviews with neighbors regarding Father's extensive and common use of marijuana (contradicting his own inconsistent statements to department interviewers), the neighbors' witnessing Father allowing the child to wander unsupervised through the carport and on the driveway of the apartment building, where he was exposed to danger from moving vehicles, and statements by the maternal grandmother-who had a very low opinion of her daughter's devotion to the child and commented on both parents' lack of attention to cleanliness in the places they and their child lived. The MAT Report had found the parents lacked basic skills to appropriately interact with their child, and that the parents lacked the knowledge of the steps required to care for the safety and well-being of a child at this age and stage of his development. That report took note of the parents' need of parenting and child safety instruction, and their failure to attend any such classes up to the date of the report. The report also noted that, prior to the fall, the child was living in an unsafe and unsanitary apartment with multiple hazards.
The police report documented that when its officers inspected the apartment after the child's fall, they observed two chairs immediately adjacent to the window, located so that the child could have fallen through the window from either; a broken marijuana pipe and soiled diapers on the living room floor; open knives within reach of the child on the bathroom counter, and a marijuana apparatus in that sink.
Further, the evidence was that the parents either denied, minimized, or ignored the child's medical and safety needs. Given their failure to follow through even when appointments had been scheduled, there was little likelihood that they would actually attend the child safety and parenting classes which were scheduled as of the time of the hearing.
As noted ante , at the hearing the court learned from the DI that, based on her investigation, she had multiple concerns for the safety of the child, because of the *448parents' failure to participate in any parenting and counseling classes, the parents' failure to take the child to the post-fall medical appointment or to keep up with the child's immunizations, as well as their failure to take the child to a pediatrician from his infancy. The DI testified that "[the parents] have not gained the insight that the child needs appropriate supervision and also needs appropriate care that they need to provide as parents."
At the conclusion of the jurisdictional hearing, counsel for the department and counsel for the child each moved to amend the Petition to conform to proof. Counsel for the department made a request to encompass in an amended charge both the history of substance abuse and the lack of appropriate parenting, which she argued interfered with the parents' ability to provide regular care and supervision of the child, also arguing that "it is premature to return the child to the parents' home until they have developed sufficient parenting skills to keep the child safe." Counsel for the child focused on the failure of the parents to adequately supervise the child and their failure to follow up with physicians "which places [the child] at risk of serious harm or illness." The court declined to grant leave to amend, dismissed the Petition, and released the child to the custody of his parents.
IV. The court's ruling denying leave to amend
The juvenile court abused its discretion in denying the motions to amend the Petition according to proof.3 In ruling that "I'm not inclined to amend the petition to conform to proof of anything at this time" (and in then dismissing the petition), the court failed to acknowledge that the record was replete with facts well-known *449to the parents, and that recognizing this circumstance by granting leave to amend to conform to proof, would not have misled the parents to their prejudice. Instead, granting the motion would have given proper weight in this case to the strong policy of favoring such amendments when the adverse party would not be prejudiced. Moreover, the record contained additional facts, determined from other sources, contained in the Jurisdiction/Disposition Report and disclosed to the parents prior to the hearing, which support our conclusion that leave to amend was required. (See, e.g., In re Jessica C, supra , 93 Cal.App.4th at pp. 1042-1043, 113 Cal.Rptr.2d 597.)
We therefore return the matter to the juvenile court to adjudicate the matter once it grants the motions to amend the Petition.
DISPOSITION
The order dismissing the Petition is reversed. The court is to allow the Petition to be amended and then hold a new jurisdictional hearing. The writ of supersedeas issued on April 4, 2016, shall dissolve upon the finality of this opinion as to this court.
We concur:
ASHMANN-GERST, Acting P.J.
HOFFSTADT, J.
Retired judge of the Los Angeles Superior Court assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.
All further statutory references are to the Welfare and Institutions Code unless otherwise stated.
"[W]here the issue on appeal turns on a failure of proof at trial, the question for a reviewing court becomes whether the evidence compels a finding in favor of the appellant as a matter of law. [Citations.]" (In re I.W. (2009) 180 Cal.App.4th 1517, 1528, 103 Cal.Rptr.3d 538.) While this articulation of the applicable test may initially be perceived as imposing a higher burden than the no substantial evidence test, it instead represents an alternative means of focusing on the requirement that the judgment must be affirmed unless there is no substantial evidence to support it.
The Petition, as filed on December 10, 2015, set forth the following allegations:
Count b-1 alleged: "[Mother] ... has a history of substance abuse and is a current abuser of a marijuana which renders [Mother] incapable of providing regular care for the child. On [November 23, 2015, Mother] had a positive toxicology screen for marijuana. On [November 23, 2015] and on prior occasions, [Mother] was under the influence of marijuana while the child was in [Mother's] care and supervision. The child is of such young age requiring constant care and supervision and [Mother's] substance abuse interferes with providing regular care and supervision of the child. [Father] ... failed to protect the child when he knew of [Mother's] substance abuse. [Mother's] substance abuse and [Father's] failure to protect the child endanger the child's physical health and safety and create a detrimental home environment, placing the child at risk of serious physical harm, damage and failure to protect."
Count b-2 alleged: "[Father] ... has history of substance abuse and is a current abuser of marijuana which renders [Father] incapable of providing regular care for the child. On prior occasions, [Father] was under the influence of marijuana while the child was in [Father's] care and supervision. The child is of such young age requiring constant care and supervision and [Father's] substance abuse interferes with providing regular care and supervision of the child. [Mother] ... failed to protect the child when she knew of [Father's] substance abuse. [Father's] substance abuse and [Mother's] failure to protect the child endanger the child's physical health and safety and create a detrimental home environment, placing the child at risk of serious physical harm, damage and failure to protect."
Count b-3 alleged: "On or about [October 10, 2015], [the child's parents] created a detrimental and endangering home environment for the child in that Law Enforcement [sic ] found a drug pipe in the child's home and within access of the child. Two knives were found in access to the child. Such a detrimental and endangering home environment established for the child by the parents endangers the child's physical health, safety and well being and places the child at risk of serious physical harm and damage."