Skip to content

Commit

Permalink
Fix a couple tsc/eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
azimux committed Mar 16, 2024
1 parent a456553 commit 378ddc8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion templates/Domain/config.ts.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let _urlBase = process.env.REACT_APP_FOOBARA_GLOBAL_URL_BASE

export default {
const config = {
get urlBase(): string {
if (_urlBase === undefined) {
throw new Error("urlBase is not set and REACT_APP_FOOBARA_GLOBAL_URL_BASE is undefined")
Expand All @@ -12,3 +12,5 @@ export default {
_urlBase = urlBase
}
}

export default config
4 changes: 3 additions & 1 deletion templates/Organization/config.ts.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let _urlBase = process.env.REACT_APP_FOOBARA_GLOBAL_URL_BASE

export default {
const config = {
get urlBase(): string {
if (_urlBase === undefined) {
throw new Error("urlBase is not set and REACT_APP_FOOBARA_GLOBAL_URL_BASE is undefined")
Expand All @@ -12,3 +12,5 @@ export default {
_urlBase = urlBase
}
}

export default config
2 changes: 1 addition & 1 deletion templates/base/DataPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function flatten (array: any[][]): any[] {
}

function uniq<T> (array: T[]): T[] {
return [...new Set(array)]
return Array.from(new Set(array));
}

function compact (array: any[]): any[] {
Expand Down

0 comments on commit 378ddc8

Please sign in to comment.