diff --git a/app/routes/circulars.moderation.$circularId.$requestor.tsx b/app/routes/circulars.moderation.$circularId.$requestor.tsx
index 9c4cdfb93..fc543196d 100644
--- a/app/routes/circulars.moderation.$circularId.$requestor.tsx
+++ b/app/routes/circulars.moderation.$circularId.$requestor.tsx
@@ -132,11 +132,6 @@ export default function () {
)
}
-const methodMap = {
- words: diffWords,
- lines: diffLines,
-}
-
function DiffedContent({
oldString,
newString,
@@ -146,10 +141,10 @@ function DiffedContent({
newString: string
method?: 'words' | 'lines'
}) {
- const diff = methodMap[method && newString ? method : 'lines'](
- oldString ?? '',
- newString ?? ''
- )
+ const diff =
+ method == 'words'
+ ? diffWords(oldString, newString)
+ : diffLines(oldString, newString)
return (
diff --git a/package-lock.json b/package-lock.json
index 8ad923bcd..2ae03824e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -86,7 +86,7 @@
"@testing-library/react": "^16.0.1",
"@trivago/prettier-plugin-sort-imports": "^4.2.1",
"@types/color-convert": "^2.0.4",
- "@types/diff": "^5.2.1",
+ "@types/diff": "^6.0.0",
"@types/grecaptcha": "^3.0.6",
"@types/jest": "^29.5.14",
"@types/lodash": "^4.17.13",
@@ -17093,9 +17093,9 @@
}
},
"node_modules/@types/diff": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.2.1.tgz",
- "integrity": "sha512-uxpcuwWJGhe2AR1g8hD9F5OYGCqjqWnBUQFD8gMZsDbv8oPHzxJF6iMO6n8Tk0AdzlxoaaoQhOYlIg/PukVU8g==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/@types/diff/-/diff-6.0.0.tgz",
+ "integrity": "sha512-dhVCYGv3ZSbzmQaBSagrv1WJ6rXCdkyTcDyoNu1MD8JohI7pR7k8wdZEm+mvdxRKXyHVwckFzWU1vJc+Z29MlA==",
"dev": true
},
"node_modules/@types/estree": {
diff --git a/package.json b/package.json
index 6f6348100..1b6f6a588 100644
--- a/package.json
+++ b/package.json
@@ -104,7 +104,7 @@
"@testing-library/react": "^16.0.1",
"@trivago/prettier-plugin-sort-imports": "^4.2.1",
"@types/color-convert": "^2.0.4",
- "@types/diff": "^5.2.1",
+ "@types/diff": "^6.0.0",
"@types/grecaptcha": "^3.0.6",
"@types/jest": "^29.5.14",
"@types/lodash": "^4.17.13",
diff --git a/sandbox-seed.json b/sandbox-seed.json
index 35534487e..d750b9b04 100644
--- a/sandbox-seed.json
+++ b/sandbox-seed.json
@@ -5153,7 +5153,8 @@
"body": "This is an example of a request with a missing createdOn field",
"requestor": "Example User at Example ",
"requestorEmail": "example@example.com",
- "subject": "Optical Observations for GRB 971227"
+ "subject": "Optical Observations for GRB 971227",
+ "submitter": "Example User at Example "
}
]
}