Skip to content

Commit 6e7c27f

Browse files
committed
Change static method
1 parent b5a36b3 commit 6e7c27f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

CSSObject/CSSObject.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ import Stylesheet from "./parser/Stylesheet.js"
5151

5252
/**
5353
* get static stylesheet
54-
* @param {string} string css text
54+
* @param {string} text css text
5555
* @param {object} callback callback
5656
*/
57-
static(string, callback) {
58-
let style = new Stylesheet(string)
59-
return callback(style)
57+
static(text, callback) {
58+
let style = new Stylesheet(text)
59+
if (typeof text == 'string') callback(style)
60+
61+
return this
6062
}
6163

6264
/**

0 commit comments

Comments
 (0)