Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

fix: issue with ie11 rendering (#301)

Guilherme Oenning95a83f88642b
diff --git a/public/services/utils.ts b/public/services/utils.ts
index 89cc23628..9c407f63e 100644
--- a/public/services/utils.ts
+++ b/public/services/utils.ts
@@ -10,7 +10,7 @@ export const classSet = (input?: any): string => {
classes += ` ${key}`;
}
}
- return classes.trimLeft();
+ return classes.trim();
}
return '';
};
diff --git a/public/tsd.d.ts b/public/tsd.d.ts
index b692a2c83..8a31e6172 100644
--- a/public/tsd.d.ts
+++ b/public/tsd.d.ts
@@ -7,3 +7,5 @@ interface JQuery {
interface Window {
ga?: (cmd: string, evt: string, args?: any) => void;
}
+
+declare var require: (id: string) => any;
diff --git a/scripts/e2e.sh b/scripts/e2e.sh
index 5fea11499..18b9e260d 100755
--- a/scripts/e2e.sh
+++ b/scripts/e2e.sh
@@ -13,7 +13,7 @@ run_e2e () {
echo "Compiling tests..."
rm -rf output
- ./node_modules/.bin/tsc
+ ./node_modules/.bin/tsc -p ./tests/tsconfig.json
echo "Starting Fider (HOST_MODE: $1)..."
docker rm -f $PG_CONTAINER || true
@@ -24,7 +24,7 @@ run_e2e () {
{
{
echo "Running e2e tests ..."
- ./node_modules/.bin/mocha -t 60000 output/tsc/tests/e2e-$1.js
+ ./node_modules/.bin/mocha -t 60000 output/tests/e2e-$1.js
} || {
echo "Tests failed...";
}
diff --git a/tests/tsconfig.json b/tests/tsconfig.json
new file mode 100644
index 000000000..8f0010353
--- /dev/null
+++ b/tests/tsconfig.json
@@ -0,0 +1,14 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "strict": true,
+ "sourceMap": false,
+ "outDir": "../output/tests",
+ "experimentalDecorators": true,
+ "emitDecoratorMetadata": true
+ },
+ "include": [
+ "./**/*"
+ ],
+}
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index 17ca94594..649fa6ffa 100755
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -4,7 +4,13 @@
"target": "es5",
"strict": true,
"sourceMap": true,
- "outDir": "output/tsc",
+ "types": [
+ "jquery",
+ "markdown-it",
+ "react",
+ "react-dom",
+ "react-textarea-autosize"
+ ],
"jsx": "react",
"lib": ["dom", "es2015.promise", "es6"],
"experimentalDecorators": true,
@@ -15,5 +21,8 @@
"*"
]
}
- }
+ },
+ "include": [
+ "./public/**/*"
+ ],
}
\ No newline at end of file