From 984a8fd980d149562b55d29864d254607141af3a Mon Sep 17 00:00:00 2001 From: nhducit Date: Tue, 9 Apr 2019 22:45:24 +0700 Subject: [PATCH] =?UTF-8?q?F=C4=A9=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compile/css/Stylesheet.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compile/css/Stylesheet.ts b/src/compile/css/Stylesheet.ts index f2b12ab611..3b1dedc467 100644 --- a/src/compile/css/Stylesheet.ts +++ b/src/compile/css/Stylesheet.ts @@ -5,11 +5,11 @@ import Element from '../nodes/Element'; import { Node, Ast } from '../../interfaces'; import Component from '../Component'; -function remove_css_prefox(name: string): string { +function remove_css_prefix(name: string): string { return name.replace(/^-((webkit)|(moz)|(o)|(ms))-/, ''); } -const is_keyframes_node = (node: Node) => remove_css_prefox(node.name) === 'keyframes'; +const is_keyframes_node = (node: Node) => remove_css_prefix(node.name) === 'keyframes'; // https://github.com/darkskyapp/string-hash/blob/master/index.js function hash(str: string): string { @@ -108,7 +108,7 @@ class Declaration { } transform(code: MagicString, keyframes: Map) { - const property = this.node.property && remove_css_prefox(this.node.property.toLowerCase()); + const property = this.node.property && remove_css_prefix(this.node.property.toLowerCase()); if (property === 'animation' || property === 'animation-name') { this.node.value.children.forEach((block: Node) => { if (block.type === 'Identifier') {