From f0b922f643e56092d37df8df8f308012fa674e26 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 9 Oct 2014 18:16:44 -0700 Subject: [PATCH] Use String::startsWith --- src/module-cache.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module-cache.coffee b/src/module-cache.coffee index d5f08e078..256a9d8b6 100644 --- a/src/module-cache.coffee +++ b/src/module-cache.coffee @@ -25,7 +25,7 @@ else pathToCheck and pathToCheck[0] is '/' isCorePath = (pathToCheck) -> - pathToCheck.indexOf(cache.resourcePathWithTrailingSlash) is 0 + pathToCheck.startsWith(cache.resourcePathWithTrailingSlash) loadDependencies = (modulePath, rootPath, rootMetadata, moduleCache) -> fs = require 'fs-plus'