Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: simplify code only deleting 'else' #208

Merged
merged 1 commit into from
Aug 27, 2019
Merged

fix: simplify code only deleting 'else' #208

merged 1 commit into from
Aug 27, 2019

Conversation

imOscarCrespo
Copy link
Contributor

I was using more code that I needed, the logic of this is for buttons of the persistent menu that once clicked the menu has to be closed

props.onClick()
} else if (props.onClick) props.onClick()
}
if (props.onClick) props.onClick()
Copy link
Contributor

@dpinol dpinol Aug 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another difference is that now props.onClick() is also called when there's path or payload. this is the expected behaviour right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes because despite of being a path or payload we can want to call a method

@imOscarCrespo imOscarCrespo merged commit 7029c3a into master Aug 27, 2019
@imOscarCrespo imOscarCrespo deleted the PM_buttons branch August 27, 2019 13:26
Iru89 pushed a commit that referenced this pull request Jul 10, 2023
<p>This PR was automatically created by Snyk using the credentials of a
real user.</p><br /><h3>Snyk has created this PR to upgrade tslib from
2.5.0 to 2.5.3.</h3>

:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>

- The recommended version is **3 versions** ahead of your current
version.
- The recommended version was released **a month ago**, on 2023-06-02.


<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>tslib</b></summary>
    <ul>
      <li>
<b>2.5.3</b> - <a
href="https://snyk.io/redirect/github/microsoft/tslib/releases/tag/v2.5.3">2023-06-02</a></br><h2>What's
Changed</h2>
<ul>
<li>Do not reference tslib.es6.js from package.json exports by <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/andrewbranch/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/andrewbranch">@ andrewbranch</a>
in <a class="issue-link js-issue-link" data-error-text="Failed to load
title" data-id="1738475228" data-permission-text="Title is private"
data-url="microsoft/tslib#208"
data-hovercard-type="pull_request"
data-hovercard-url="/microsoft/tslib/pull/208/hovercard"
href="https://snyk.io/redirect/github/microsoft/tslib/pull/208">#208</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a class="commit-link"
href="https://snyk.io/redirect/github/microsoft/tslib/compare/2.5.2...v2.5.3"><tt>2.5.2...v2.5.3</tt></a></p>
      </li>
      <li>
<b>2.5.2</b> - <a
href="https://snyk.io/redirect/github/microsoft/tslib/releases/tag/2.5.2">2023-05-18</a></br><p>This
release <a
href="https://snyk.io/redirect/github/microsoft/tslib/pull/204"
data-hovercard-type="pull_request"
data-hovercard-url="/microsoft/tslib/pull/204/hovercard">explicitly
re-exports helpers</a> to work around TypeScript's incomplete symbol
resolution for tslib.</p>
      </li>
      <li>
<b>2.5.1</b> - <a
href="https://snyk.io/redirect/github/microsoft/tslib/releases/tag/2.5.1">2023-05-17</a></br><p>This
release of tslib provides fixes for two issues.</p>
<p>First, <a
href="https://snyk.io/redirect/github/microsoft/tslib/pull/202"
data-hovercard-type="pull_request"
data-hovercard-url="/microsoft/tslib/pull/202/hovercard">it reverses the
order of <code>init</code> hooks provided by decorators</a> to correctly
reflect proposed behavior.</p>
<p>Second, it <a
href="https://snyk.io/redirect/github/microsoft/tslib/pull/202"
data-hovercard-type="pull_request"
data-hovercard-url="/microsoft/tslib/pull/202/hovercard">corrects the
<code>exports</code> field of tslib's <code>package.json</code> and
provides accurate declaration files</a> so that it may be consumed under
the <code>node16</code> and <code>bundler</code> settings for
<code>moduleResolution.</code></p>
      </li>
      <li>
<b>2.5.0</b> - <a
href="https://snyk.io/redirect/github/microsoft/tslib/releases/tag/2.5.0">2023-01-26</a></br><h2>What's
New</h2>
<ul>
<li>Fix asyncDelegator reporting done too early by <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/apendua/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/apendua">@ apendua</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1450489814" data-permission-text="Title is private"
data-url="microsoft/tslib#187"
data-hovercard-type="pull_request"
data-hovercard-url="/microsoft/tslib/pull/187/hovercard"
href="https://snyk.io/redirect/github/microsoft/tslib/pull/187">#187</a></li>
<li>Add support for TypeScript 5.0's <code>__esDecorate</code> and
related helpers by <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/rbuckton/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/rbuckton">@ rbuckton</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1550117093" data-permission-text="Title is private"
data-url="microsoft/tslib#193"
data-hovercard-type="pull_request"
data-hovercard-url="/microsoft/tslib/pull/193/hovercard"
href="https://snyk.io/redirect/github/microsoft/tslib/pull/193">#193</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a class="commit-link"
href="https://snyk.io/redirect/github/microsoft/tslib/compare/2.4.1...2.5.0"><tt>2.4.1...2.5.0</tt></a></p>
      </li>
    </ul>
from <a
href="https://snyk.io/redirect/github/Microsoft/tslib/releases">tslib
GitHub release notes</a>
  </details>
</details>


<details>
  <summary><b>Commit messages</b></summary>
  </br>
  <details>
    <summary>Package name: <b>tslib</b></summary>
    <ul>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/cc5ff034c859a04008e9de1393cb54c755939c1c">cc5ff03</a>
2.5.3</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/a471c51e3127e7e2e8c4454c377c023d5bea7be5">a471c51</a>
Merge pull request #208 from microsoft/moar-modules</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/80deca0c2d74e1ba8381478392844cb54b7f5688">80deca0</a>
Do not reference tslib.es6.js from package.json exports</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/e623061dc031172d9e5075bdba120f4c61bd3eeb">e623061</a>
Bump version to 2.5.2.</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/2b57a9264ec705eceffc742e05f03fd760be5488">2b57a92</a>
Use named reexport to satsify incomplete TS symbol resolution
(#204)</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/91fcbd0c62f644e3527d99126bf7751cdbc372dc">91fcbd0</a>
Reverse order of decorator-injected initializers (#202)</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/eab3cfffbef40cbda16ca2c679d06eea6445ee41">eab3cff</a>
Merge pull request #200 from Andarist/fix/import-types</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/5ef7d1a095e351e697c76732b7caa45f8477274a">5ef7d1a</a>
Update modules/index.d.ts</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/7def8467706e2157640a372bec73961ab7571b1f">7def846</a>
Merge pull request #201 from microsoft/fix-esm</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/4e79d0343f5b7079a6576c9100345216876e94dc">4e79d03</a>
Merge pull request #179 from guybedford/patch-4</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/033b36396466a3595a1a44f4791da20692a4c732">033b363</a>
Add default export to modules/index.js</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/897f11e51e20454169a3d8a691a073662f901774">897f11e</a>
Ensure tslib.es6.js is typed</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/a0a67d9bf5ac773982e079aec626b9d6ff2060f6">a0a67d9</a>
Add Node-specific export condition for ESM entrypoint that re-exports
CJS</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/0f84d4059c7731d5a9a250d88dc29cef7ea53db4">0f84d40</a>
Add propert declaration file for the &#x60;import&#x60; condition</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/a100d7b62ea5fc275b19666d486084135210f15a">a100d7b</a>
Merge pull request #195 from xfq/https</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/d58182f8d72b95e1b3e2cf01ea4f6a13cf4ce65e">d58182f</a>
http -&gt; https</li>
<li><a
href="https://snyk.io/redirect/github/microsoft/tslib/commit/68870a6df2b54b569da3167b3fd8f6432bb49ad8">68870a6</a>
fix: default interop compat for &quot;module&quot; condition</li>
    </ul>

<a
href="https://snyk.io/redirect/github/microsoft/tslib/compare/e388a23287bdea2c4f411d3ddedd1c80002f76a7...cc5ff034c859a04008e9de1393cb54c755939c1c">Compare</a>
  </details>
</details>
<hr/>

**Note:** *You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs.*

For more information: <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIzM2MzYWZlYS1iNjBkLTRjN2UtOTk1Yi1hNzYyNjc4NDc2MzQiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjMzYzNhZmVhLWI2MGQtNGM3ZS05OTViLWE3NjI2Nzg0NzYzNCJ9fQ=="
width="0" height="0"/>

🧐 [View latest project
report](https://app.snyk.io/org/manuelfidalgo/project/92ee3cd7-3259-48df-8c14-ac2779c858d3?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/manuelfidalgo/project/92ee3cd7-3259-48df-8c14-ac2779c858d3/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/manuelfidalgo/project/92ee3cd7-3259-48df-8c14-ac2779c858d3/settings/integration?pkg&#x3D;tslib&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

<!---
(snyk:metadata:{"prId":"33c3afea-b60d-4c7e-995b-a76267847634","prPublicId":"33c3afea-b60d-4c7e-995b-a76267847634","dependencies":[{"name":"tslib","from":"2.5.0","to":"2.5.3"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/manuelfidalgo/project/92ee3cd7-3259-48df-8c14-ac2779c858d3?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"92ee3cd7-3259-48df-8c14-ac2779c858d3","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2023-06-02T21:22:08.810Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]})
--->

Co-authored-by: snyk-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants