Skip to content

Commit e84abee

Browse files
committed
Just check if build_json_task is not nil
If the task does not exist, a compilation error will be thrown.
1 parent d6b8df6 commit e84abee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/ex_css_modules/ex_css_modules.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ defmodule ExCSSModules do
4444
|> File.read!()
4545
|> json_library().decode!()
4646

47-
not is_nil(build_json_task) ->
47+
build_json_task ->
4848
with {:ok, json_filename} <- build_json_task.run(filename: filename) do
4949
json_filename
5050
|> File.read!()

lib/ex_css_modules/view.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule ExCSSModules.View do
1111
also be enabled through the `:embed_by_default` config option.
1212
1313
If adds the following functions to the View:
14-
- stylesheet/0 - same as ExCSSModules.stylesheet/1 with the stylesheet predefined
14+
- stylesheet/0 - same as ExCSSModules.stylesheet/2 with the stylesheet predefined
1515
- class/1 - same as ExCSSModules.class/2 with the stylesheet predefined
1616
- class_name/1 - same as ExCSSModules.class_name/2 with the stylesheet predefined
1717
- class_name/2 - same as ExCSSModules.class_name/3 with the stylesheet predefined

0 commit comments

Comments
 (0)