Skip to content

Commit

Permalink
Don't throw an error when importing the same path
Browse files Browse the repository at this point in the history
Importing the same path is completely valid in Sass. We don't error
when `@import`ing the same path, this should not when using custom
importers.

Fixes sass#1711
  • Loading branch information
xzyfer committed Nov 10, 2015
1 parent d18808d commit d7a40e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,11 @@ namespace Sass {

// do not parse same resource twice
// maybe raise an error in this case
if (sheets.count(inc.abs_path)) {
free(res.contents); free(res.srcmap);
throw std::runtime_error("duplicate resource registered");
return;
}
// if (sheets.count(inc.abs_path)) {
// free(res.contents); free(res.srcmap);
// throw std::runtime_error("duplicate resource registered");
// return;
// }

// get index for this resource
size_t idx = resources.size();
Expand Down

0 comments on commit d7a40e1

Please sign in to comment.