Skip to content

A /undefined request is made when taking a photo #85

@Spielboerg

Description

@Spielboerg

ionic/pwa-elements version:

@ionic/pwa-elements@3.0.2

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior:
After taking a photo but before the confirmation screen is visible, a /undefined network request is made. This happens because a variable used to set a background image is undefined for a short time:

undefined bug

Expected behavior:
No /undefined request is made.

Steps to reproduce:

  1. Open the dev tools and keep an eye on the network requests
  2. Open camera
  3. Take a photo
  4. A /undefined request is made

Related code:
camera.tsx, line 436

<div class="accept">
  <div
    class="accept-image"
    style={{
      backgroundImage: `url(${this.photoSrc})`,
      ...acceptStyles
    }} />
</div>

Related pull requests:
Since I looked at the code for the first time today and have no overview/understanding of the whole project, I don't know if the if clause in camera.tsx, line 431 is wrong (fixed in version 2) or if it should be caught if this.photoSrc is not set (fixed in version 2).

Version 1: #86
Version 2: #87

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