Fix deep recursion glitch

Signed-off-by: James P. Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
James P. Ketrenos 2023-01-20 19:20:51 -08:00
parent 266ce00d33
commit e54fc968e6
3 changed files with 23 additions and 5 deletions

View File

@ -8,6 +8,7 @@ import {
Routes, Routes,
useParams useParams
} from "react-router-dom"; } from "react-router-dom";
import equal from "fast-deep-equal";
import './App.css'; import './App.css';
const base = process.env.PUBLIC_URL; /* /identities -- set in .env */ const base = process.env.PUBLIC_URL; /* /identities -- set in .env */
@ -404,9 +405,12 @@ const App = () => {
} }
for (let key in identities) { for (let key in identities) {
if (identities[key].identityId === identity.identityId) { if (identities[key].identityId === identity.identityId) {
if (identities[key] !== identity) { let same = true;
/* Inherit all fields from prior identity, while [ 'displayName', 'firstName', 'lastName', 'middleName' ]
* also keeping the same reference pointer */ .forEach((field: string) => {
same = same && (identities[key] as any)[field] === (identity as any)[field];
});
if (!same) {
identities[key] = { identities[key] = {
...identity, ...identity,
relatedFaces: identities[key].relatedFaces relatedFaces: identities[key].relatedFaces

View File

@ -17,10 +17,10 @@ services:
# - db # - db
restart: always restart: always
ports: ports:
- ${PORT}:80 # nginx -> server/app.js express app - ${PORT}:443 # nginx -> server/app.js express app
# - 127.0.0.1:${SHELL_PORT}:4200 # shellinabox # - 127.0.0.1:${SHELL_PORT}:4200 # shellinabox
volumes: volumes:
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys - /etc/letsencrypt:/etc/letsencrypt:ro # Use host web keys
- ${PICTURES}:/pictures - ${PICTURES}:/pictures
- ${PWD}/db:/website/db - ${PWD}/db:/website/db
- ${PWD}/config/local.json:/website/config/local.json - ${PWD}/config/local.json:/website/config/local.json

View File

@ -1,4 +1,18 @@
server { server {
listen 80 default_server;
listen [::]:80 default_server;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
client_max_body_size 5g;
ssl on;
ssl_certificate /etc/letsencrypt/live/ketrenos.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ketrenos.com/privkey.pem;
root /website; root /website;
index index.html; index index.html;