Skip to content

loadImage() broken when using Editor with p5 0.10.2 #1196

Closed
@stalgiag

Description

@stalgiag

Nature of issue?

  • Found a bug

Details about the bug:

  • Web browser and version: Chrome 77.0.3865
  • Operating System: Windows
  • Steps to reproduce this bug: Go to this example

I am using the web editor to host some examples for p5.xr, so I have been manually loading in v0.10.2 of p5 into the editor since it isn't default linked yet. This is lucky because in doing so, I found that loadImage() silently fails (or silently to the editor console, not to the browser console).

The error is :

TypeError: Cannot read property 'includes' of null

for this line. So fetchResponse.headers.get('content-type') is returning null. Note that this works when the sketch is run locally.

Funny enough, I actually wrote the line that is giving the bug. I can fix it on the p5 side if that makes sense, but I am wondering if there is any idea over here as to why this would throw an error on the editor in specific?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions