Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /app
RUN npm prune --omit=dev --no-audit --no-fund
EXPOSE 4000
ENV PORT=4000
CMD ["node", "dist/osf/server/server.mjs"]
CMD ["node", "--enable-source-maps", "dist/osf/server/server.mjs"]

# Static dist artifact stage
FROM node:22-alpine AS dist
Expand Down
1 change: 1 addition & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"ssr": {
"entry": "src/server.ts"
},
"sourceMap": true,
"budgets": [
{
"type": "initial",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:check-coverage-thresholds": "node .github/scripts/check-coverage-thresholds.js",
"test:display": "node .github/counter/counter.test.display.js",
"watch": "ng build --watch --configuration development",
"serve:ssr:osf": "node dist/osf/server/server.mjs"
"serve:ssr:osf": "node --enable-source-maps dist/osf/server/server.mjs"
},
"private": true,
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,18 @@ import { Card } from 'primeng/card';
import { Skeleton } from 'primeng/skeleton';
import { Tag } from 'primeng/tag';

import { DatePipe } from '@angular/common';
import { ChangeDetectionStrategy, Component, computed, effect, inject, input, OnDestroy, output } from '@angular/core';
import { DatePipe, isPlatformBrowser } from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
computed,
effect,
inject,
input,
OnDestroy,
output,
PLATFORM_ID,
} from '@angular/core';
import { Router } from '@angular/router';

import { ApplicabilityStatus, PreregLinkInfo } from '@osf/features/preprints/enums';
Expand Down Expand Up @@ -57,6 +67,8 @@ export class PreprintTombstoneComponent implements OnDestroy {
});
private router = inject(Router);

private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));

preprintVersionSelected = output<string>();

preprintProvider = input.required<PreprintProviderDetails | undefined>();
Expand Down Expand Up @@ -91,7 +103,9 @@ export class PreprintTombstoneComponent implements OnDestroy {
}

ngOnDestroy(): void {
this.actions.resetContributorsState();
if (this.isBrowser) {
this.actions.resetContributorsState();
}
}

tagClicked(tag: string) {
Expand Down
Loading