Repository: chartjs/chartjs-plugin-zoom
Pull request #623 (2022-02-26 02:19:57)

Bump prismjs from 1.25.0 to 1.27.0
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.25.0 to 1.27.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/PrismJS/prism/releases">prismjs's releases</a>.</em></p>
<blockquote>
<h2>v1.27.0</h2>
<p>Release 1.27.0</p>
<h2>v1.26.0</h2>
<p>Release 1.26.0</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/PrismJS/prism/blob/master/CHANGELOG.md">prismjs's changelog</a>.</em></p>
<blockquote>
<h2>1.27.0 (2022-02-17)</h2>
<h3>New components</h3>
<ul>
<li><strong>UO Razor Script</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3309">#3309</a>) <a href="https://github.com/PrismJS/prism/commit/3f8cc5a0"><code>3f8cc5a0</code></a></li>
</ul>
<h3>Updated components</h3>
<ul>
<li><strong>AutoIt</strong>
<ul>
<li>Allow hyphen in directive (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3308">#3308</a>) <a href="https://github.com/PrismJS/prism/commit/bcb2e2c8"><code>bcb2e2c8</code></a></li>
</ul>
</li>
<li><strong>EditorConfig</strong>
<ul>
<li>Change alias of <code>section</code> from <code>keyword</code> to <code>selector</code> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3305">#3305</a>) <a href="https://github.com/PrismJS/prism/commit/e46501b9"><code>e46501b9</code></a></li>
</ul>
</li>
<li><strong>Ini</strong>
<ul>
<li>Swap out <code>header</code> for <code>section</code> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3304">#3304</a>) <a href="https://github.com/PrismJS/prism/commit/deb3a97f"><code>deb3a97f</code></a></li>
</ul>
</li>
<li><strong>MongoDB</strong>
<ul>
<li>Added v5 support (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3297">#3297</a>) <a href="https://github.com/PrismJS/prism/commit/8458c41f"><code>8458c41f</code></a></li>
</ul>
</li>
<li><strong>PureBasic</strong>
<ul>
<li>Added missing keyword and fixed constants ending with <code>$</code> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3320">#3320</a>) <a href="https://github.com/PrismJS/prism/commit/d6c53726"><code>d6c53726</code></a></li>
</ul>
</li>
<li><strong>Scala</strong>
<ul>
<li>Added support for interpolated strings (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3293">#3293</a>) <a href="https://github.com/PrismJS/prism/commit/441a1422"><code>441a1422</code></a></li>
</ul>
</li>
<li><strong>Systemd configuration file</strong>
<ul>
<li>Swap out <code>operator</code> for <code>punctuation</code> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3306">#3306</a>) <a href="https://github.com/PrismJS/prism/commit/2eb89e15"><code>2eb89e15</code></a></li>
</ul>
</li>
</ul>
<h3>Updated plugins</h3>
<ul>
<li><strong>Command Line</strong>
<ul>
<li>Escape markup in command line output (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3341">#3341</a>) <a href="https://github.com/PrismJS/prism/commit/e002e78c"><code>e002e78c</code></a></li>
<li>Add support for line continuation and improved colors (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3326">#3326</a>) <a href="https://github.com/PrismJS/prism/commit/1784b175"><code>1784b175</code></a></li>
<li>Added span around command and output (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3312">#3312</a>) <a href="https://github.com/PrismJS/prism/commit/82d0ca15"><code>82d0ca15</code></a></li>
</ul>
</li>
</ul>
<h3>Other</h3>
<ul>
<li><strong>Core</strong>
<ul>
<li>Added better error message for missing grammars (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3311">#3311</a>) <a href="https://github.com/PrismJS/prism/commit/2cc4660b"><code>2cc4660b</code></a></li>
</ul>
</li>
</ul>
<h2>1.26.0 (2022-01-06)</h2>
<h3>New components</h3>
<ul>
<li><strong>Atmel AVR Assembly</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2078">#2078</a>) <a href="https://github.com/PrismJS/prism/commit/b5a70e4c"><code>b5a70e4c</code></a></li>
<li><strong>Go module</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3209">#3209</a>) <a href="https://github.com/PrismJS/prism/commit/8476a9ab"><code>8476a9ab</code></a></li>
<li><strong>Keepalived Configure</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2417">#2417</a>) <a href="https://github.com/PrismJS/prism/commit/d908e457"><code>d908e457</code></a></li>
<li><strong>Tremor</strong> &amp; <strong>Trickle</strong> &amp; <strong>Troy</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3087">#3087</a>) <a href="https://github.com/PrismJS/prism/commit/ec25ba65"><code>ec25ba65</code></a></li>
<li><strong>Web IDL</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3107">#3107</a>) <a href="https://github.com/PrismJS/prism/commit/ef53f021"><code>ef53f021</code></a></li>
</ul>
<h3>Updated components</h3>
<ul>
<li>Use <code>\d</code> for <code>[0-9]</code> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3097">#3097</a>) <a href="https://github.com/PrismJS/prism/commit/9fe2f93e"><code>9fe2f93e</code></a></li>
<li><strong>6502 Assembly</strong>
<ul>
<li>Use standard tokens and minor improvements (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3184">#3184</a>) <a href="https://github.com/PrismJS/prism/commit/929c33e0"><code>929c33e0</code></a></li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/PrismJS/prism/commit/703881e14bf7530b180fad6052e535d0085315cd"><code>703881e</code></a> 1.27.0</li>
<li><a href="https://github.com/PrismJS/prism/commit/7ac13734c13fbf3d495b199cda6fa9752e2c8326"><code>7ac1373</code></a> Updated changelog for v1.27.0 (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3342">#3342</a>)</li>
<li><a href="https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c"><code>e002e78</code></a> Command Line: Escape markup in command line output (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3341">#3341</a>)</li>
<li><a href="https://github.com/PrismJS/prism/commit/13b56a9c594bc3792500d4e12cbb4053d4372f7d"><code>13b56a9</code></a> Bump follow-redirects from 1.14.7 to 1.14.8 (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3338">#3338</a>)</li>
<li><a href="https://github.com/PrismJS/prism/commit/f094c4a36447568de18910f67e3fd7a11e3bdd74"><code>f094c4a</code></a> Bump yargs-parser from 5.0.0 to 5.0.1 (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3334">#3334</a>)</li>
<li><a href="https://github.com/PrismJS/prism/commit/9fd4c74d9c6eb393e905f9ff1d0e0815bc9a15c1"><code>9fd4c74</code></a> Bump ajv from 6.10.0 to 6.12.6 (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3333">#3333</a>)</li>
<li><a href="https://github.com/PrismJS/prism/commit/3fcca6b722afbc71297cfa614e42bf700be7c15b"><code>3fcca6b</code></a> Bump pathval from 1.1.0 to 1.1.1 (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3331">#3331</a>)</li>
<li><a href="https://github.com/PrismJS/prism/commit/1784b175dbf0be95af5e8bc436a3689d90b98a4f"><code>1784b17</code></a> Command Line: Add support for line continuation and improved colors (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3326">#3326</a>)</li>
<li><a href="https://github.com/PrismJS/prism/commit/f5458431a051c5ad27dfeba4a96fd14567d5a763"><code>f545843</code></a> ESLint: Allow <code>Map</code> and <code>Set</code> in ES5 code (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3328">#3328</a>)</li>
<li><a href="https://github.com/PrismJS/prism/commit/d6c537261684f89c4740598c8d0c8f77215b88f3"><code>d6c5372</code></a> PureBasic: Added missing keyword and fixed constants ending with <code>$</code> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3320">#3320</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/PrismJS/prism/compare/v1.25.0...v1.27.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prismjs&package-manager=npm_and_yarn&previous-version=1.25.0&new-version=1.27.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/chartjs/chartjs-plugin-zoom/network/alerts).

</details>


Patch:
diff --git a/package-lock.json b/package-lock.json
index 47b94c1..15ad6b6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10660,9 +10660,9 @@
       }
     },
     "node_modules/karma": {
-      "version": "6.3.14",
-      "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.14.tgz",
-      "integrity": "sha512-SDFoU5F4LdosEiUVWUDRPCV/C1zQRNtIakx7rWkigf7R4sxGADlSEeOma4S1f/js7YAzvqLW92ByoiQptg+8oQ==",
+      "version": "6.3.16",
+      "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.16.tgz",
+      "integrity": "sha512-nEU50jLvDe5yvXqkEJRf8IuvddUkOY2x5Xc4WXHz6dxINgGDrgD2uqQWeVrJs4hbfNaotn+HQ1LZJ4yOXrL7xQ==",
       "dev": true,
       "dependencies": {
         "body-parser": "^1.19.0",
@@ -10680,6 +10680,7 @@
         "log4js": "^6.4.1",
         "mime": "^2.5.2",
         "minimatch": "^3.0.4",
+        "mkdirp": "^0.5.5",
         "qjobs": "^1.2.0",
         "range-parser": "^1.2.1",
         "rimraf": "^3.0.2",
@@ -13348,10 +13349,13 @@
       }
     },
     "node_modules/prismjs": {
-      "version": "1.25.0",
-      "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.25.0.tgz",
-      "integrity": "sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg==",
-      "dev": true
+      "version": "1.27.0",
+      "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz",
+      "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==",
+      "dev": true,
+      "engines": {
+        "node": ">=6"
+      }
     },
     "node_modules/process": {
       "version": "0.11.10",
@@ -16610,9 +16614,9 @@
       }
     },
     "node_modules/url-parse": {
-      "version": "1.5.3",
-      "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz",
-      "integrity": "sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==",
+      "version": "1.5.10",
+      "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
+      "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
       "dev": true,
       "dependencies": {
         "querystringify": "^2.1.1",
@@ -27159,9 +27163,9 @@
       }
     },
     "karma": {
-      "version": "6.3.14",
-      "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.14.tgz",
-      "integrity": "sha512-SDFoU5F4LdosEiUVWUDRPCV/C1zQRNtIakx7rWkigf7R4sxGADlSEeOma4S1f/js7YAzvqLW92ByoiQptg+8oQ==",
+      "version": "6.3.16",
+      "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.16.tgz",
+      "integrity": "sha512-nEU50jLvDe5yvXqkEJRf8IuvddUkOY2x5Xc4WXHz6dxINgGDrgD2uqQWeVrJs4hbfNaotn+HQ1LZJ4yOXrL7xQ==",
       "dev": true,
       "requires": {
         "body-parser": "^1.19.0",
@@ -27179,6 +27183,7 @@
         "log4js": "^6.4.1",
         "mime": "^2.5.2",
         "minimatch": "^3.0.4",
+        "mkdirp": "^0.5.5",
         "qjobs": "^1.2.0",
         "range-parser": "^1.2.1",
         "rimraf": "^3.0.2",
@@ -29383,9 +29388,9 @@
       "dev": true
     },
     "prismjs": {
-      "version": "1.25.0",
-      "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.25.0.tgz",
-      "integrity": "sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg==",
+      "version": "1.27.0",
+      "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz",
+      "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==",
       "dev": true
     },
     "process": {
@@ -32031,9 +32036,9 @@
       }
     },
     "url-parse": {
-      "version": "1.5.3",
-      "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz",
-      "integrity": "sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==",
+      "version": "1.5.10",
+      "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
+      "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
       "dev": true,
       "requires": {
         "querystringify": "^2.1.1",
diff --git a/src/core.js b/src/core.js
index be259a4..79b4ad4 100644
--- a/src/core.js
+++ b/src/core.js
@@ -218,11 +218,11 @@ export function isZoomedOrPanned(chart) {
   for (const scaleId of Object.keys(chart.scales)) {
     const {min: originalMin, max: originalMax} = scaleBounds[scaleId];
 
-    if (chart.scales[scaleId].min !== originalMin) {
+    if (originalMin !== undefined && chart.scales[scaleId].min !== originalMin) {
       return true;
     }
 
-    if (chart.scales[scaleId].max !== originalMax) {
+    if (originalMax !== undefined && chart.scales[scaleId].max !== originalMax) {
       return true;
     }
   }


Test patch:
diff --git a/test/specs/api.spec.js b/test/specs/api.spec.js
index fd98bf6..46f1672 100644
--- a/test/specs/api.spec.js
+++ b/test/specs/api.spec.js
@@ -142,6 +142,8 @@ describe('api', function() {
         }
       });
 
+      expect(chart.isZoomedOrPanned()).toBe(false);
+
       chart.zoom(1);
       expect(chart.isZoomedOrPanned()).toBe(false);
 
@@ -172,6 +174,8 @@ describe('api', function() {
         }
       });
 
+      expect(chart.isZoomedOrPanned()).toBe(false);
+
       chart.pan({x: 0, y: 0});
       expect(chart.isZoomedOrPanned()).toBe(false);