On 11/9/16, 10:31 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" <carlos.rov...@gmail.com on behalf of carlos.rov...@codeoscopic.com> wrote:
>Hi Alex, > >maybe you said ";" and you want to say "/", I think the algorithm should >break in: > >parts[0] -> color: #666 >parts[1] -> height: 176px >parts[2] -> background: url('assets/Unknown.jpeg') center / cover I agree those should be the parts, which is why you have to split on ';' and not '/', but given that your original string ended with ';', I was thinking you were also getting: parts[3] -> "" I would recommend checking via a debugger or console output. > >and then when reach the latest, split in: > >pieces = ["background", "url('assets/Unknown.jpeg') center / cover"] I agree again, which is why that split is based on ':'. But if the code tried to split a parts[3] that was an empty string, then you would just get: pieces = [""]; And then pieces[1] would be null. Again, I would recommend checking via a debugger or console output. > >Anyway, if I try to reduce to this: > ><mdl:CardTitle style="color: #666;height: 176px; >background:url('assets/Unknown.jpeg')"> > >I continue having the same null error. > I don't know why that would be, but I would recommend using a debugger and or console output to verify the number of parts and pieces and what they are. HTH, -Alex