We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
string.repeat()
1 parent 92e951f commit 0def7bcCopy full SHA for 0def7bc
packages/vue/src/components.ts
@@ -8,17 +8,8 @@ const ROOT_COMPONENT_NAME = '<Root>';
8
const ANONYMOUS_COMPONENT_NAME = '<Anonymous>';
9
10
const repeat = (str: string, n: number): string => {
11
- let res = '';
12
- while (n) {
13
- if (n % 2 === 1) {
14
- res += str;
15
- }
16
- if (n > 1) {
17
- str += str; // eslint-disable-line no-param-reassign
18
19
- n >>= 1; // eslint-disable-line no-bitwise, no-param-reassign
20
21
- return res;
+ // string.repeat() is not supported by IE11, we fall back to just using the string in that case
+ return str.repeat ? str.repeat(n) : str;
22
};
23
24
export const formatComponentName = (vm?: ViewModel, includeFile?: boolean): string => {
0 commit comments