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

Uncaught ReferenceError: ndf2 is not defined #1

Open
mikamaunula opened this issue Nov 30, 2023 · 0 comments
Open

Uncaught ReferenceError: ndf2 is not defined #1

mikamaunula opened this issue Nov 30, 2023 · 0 comments

Comments

@mikamaunula
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @yatiac/[email protected] for the project I'm working on.

There was an error Uncaught ReferenceError: ndf2 is not defined when running the code.

Here is the diff that solved my problem:

diff --git a/node_modules/@yatiac/name-that-color/index.js b/node_modules/@yatiac/name-that-color/index.js
index a7d3bd3..b4b257c 100644
--- a/node_modules/@yatiac/name-that-color/index.js
+++ b/node_modules/@yatiac/name-that-color/index.js
@@ -26,7 +26,7 @@ module.exports = function name(color) {
     var r = rgbVal[0], g = rgbVal[1], b = rgbVal[2];
     var hslVal = hsl(color);
     var h = hslVal[0], s = hslVal[1], l = hslVal[2];
-    var ndf1 = 0; ndf2 = 0; ndf = 0;
+    var ndf1 = 0, ndf2 = 0, ndf = 0;
     var cl = -1, df = -1;
 
     for (var i = 0; i < names.length; i++) {

This issue body was partially generated by patch-package.

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

No branches or pull requests

1 participant